File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
integration-tests/js-compute Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -17,18 +17,18 @@ async function app(event) {
17
17
try {
18
18
const path = ( new URL ( event . request . url ) ) . pathname
19
19
console . log ( `path: ${ path } ` )
20
- FASTLY_SERVICE_VERSION = env ( 'FASTLY_SERVICE_VERSION' )
20
+ FASTLY_SERVICE_VERSION = env ( 'FASTLY_SERVICE_VERSION' ) || 'local'
21
21
console . log ( `FASTLY_SERVICE_VERSION: ${ FASTLY_SERVICE_VERSION } ` )
22
22
if ( routes . has ( path ) ) {
23
23
const routeHandler = routes . get ( path )
24
- res = await routeHandler ( )
24
+ res = await routeHandler ( event )
25
25
} else {
26
26
res = fail ( `${ path } endpoint does not exist` )
27
27
}
28
28
} catch ( error ) {
29
29
res = fail ( `The routeHandler threw an error: ${ error . message } ` + '\n' + error . stack )
30
30
} finally {
31
- res . headers . set ( 'FASTLY_SERVICE_VERSION ' , env ( ' FASTLY_SERVICE_VERSION' ) ) ;
31
+ res . headers . set ( 'fastly_service_version ' , FASTLY_SERVICE_VERSION ) ;
32
32
}
33
33
return res ;
34
34
}
You can’t perform that action at this time.
0 commit comments