Add context to cf function

This commit is contained in:
Sam Carlton 2022-02-27 14:37:29 -06:00
parent 10e1679529
commit 2ab70f2eb4

View file

@ -9,5 +9,8 @@ export async function onRequest(context) {
data, // arbitrary space for passing data between middlewares data, // arbitrary space for passing data between middlewares
} = context; } = context;
return new Response('Hello, worker!') return new Response(JSON.stringify({
message: 'Hello, worker!',
context,
})
} }