diff --git a/runtimes/nodejs/src/storage-server.ts b/runtimes/nodejs/src/storage-server.ts index 6d764a2b16..eea94ddf0c 100644 --- a/runtimes/nodejs/src/storage-server.ts +++ b/runtimes/nodejs/src/storage-server.ts @@ -62,9 +62,9 @@ const storageServer = http.createServer( try { const proxyReqUrl = new URL(Config.OSS_INTERNAL_ENDPOINT) - + const reqHost = new URL(`${req.headers['x-forwarded-proto']}://${req.headers.host}`) const path = await websiteHostingPathHandler( - req.headers.host || '', + reqHost.hostname || '', req.url || '', )