File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/presets/scaleway/runtime Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -9,14 +9,16 @@ type Event = Parameters<Parameters<typeof serveHandler>[0]>[0];
99type Context = Parameters < Parameters < typeof serveHandler > [ 0 ] > [ 1 ] ;
1010
1111export async function handler ( event : Event , context : Context ) {
12- const headers = Object . fromEntries (
13- Object . entries ( event . headers ! ) . map ( ( [ key , value ] ) => [ key , String ( value ) ] )
12+ const headers = new Headers (
13+ Object . fromEntries (
14+ Object . entries ( event . headers ! ) . map ( ( [ key , value ] ) => [ key , String ( value ) ] )
15+ )
1416 ) ;
1517
1618 const url = withQuery (
1719 joinURL (
18- headers ?. [ "X-Forwarded-Proto" ] === "http" ? "http://" : "https://" ,
19- headers . host ,
20+ headers . get ( "X-Forwarded-Proto" ) === "http" ? "http://" : "https://" ,
21+ headers . get ( " host" ) ! ,
2022 event . path
2123 ) ,
2224 event . queryStringParameters ?? { }
You can’t perform that action at this time.
0 commit comments