mirror of
https://github.com/syumai/workers.git
synced 2025-03-10 17:29:11 +00:00
export onRequest function from shim.mjs
This commit is contained in:
parent
de60dcaed9
commit
b581579118
@ -27,3 +27,10 @@ export async function scheduled(event, env, ctx) {
|
||||
await run();
|
||||
return runScheduler(event, { env, ctx });
|
||||
}
|
||||
|
||||
// onRequest handles request to Cloudflare Pages
|
||||
export async function onRequest(ctx) {
|
||||
await run();
|
||||
const { request, env } = ctx;
|
||||
return handleRequest(request, { env, ctx });
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user