This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addEventListener('fetch', (event) => { | |
const mutable_request = new Request(event.request); | |
event.respondWith(directRequestToCodeEngineApp(mutable_request)); | |
}); | |
async function directRequestToCodeEngineApp(request) { | |
// FQDN of the Code Engine application that should receive the traffic | |
const targetHost = '<app-name>.<randomcharacters>.<region-name>.codeengine.appdomain.cloud'; | |