diff --git a/templates/_worker.js/index.ts b/templates/_worker.js/index.ts index 42bf66a88..61b5a6f7b 100644 --- a/templates/_worker.js/index.ts +++ b/templates/_worker.js/index.ts @@ -128,6 +128,8 @@ declare const __MIDDLEWARE__: EdgeFunctions; export default { async fetch(request, env, context) { + globalThis.process.env = { ...globalThis.process.env, ...env }; + const { pathname } = new URL(request.url); const routes = routesMatcher({ request }, __CONFIG__.routes);