Skip to content

Commit 5718b3d

Browse files
committed
fixup! add comments for ext mw
1 parent 47f79d5 commit 5718b3d

File tree

1 file changed

+2
-0
lines changed
  • packages/cloudflare/src/cli/templates

1 file changed

+2
-0
lines changed

packages/cloudflare/src/cli/templates/init.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ function initRuntime() {
9494

9595
Object.assign(globalThis, {
9696
Request: CustomRequest,
97+
// This is only needed for an external middleware bundle
9798
__dangerous_ON_edge_converter_returns_request: true,
9899
//@ts-expect-error Inline at build time by ESBuild
99100
__BUILD_TIMESTAMP_MS__: __BUILD_TIMESTAMP_MS__,
@@ -121,6 +122,7 @@ function populateProcessEnv(url: URL, env: CloudflareEnv) {
121122
}
122123

123124
// Set the default Origin for the origin resolver.
125+
// This is only needed for an external middleware bundle
124126
process.env.OPEN_NEXT_ORIGIN = JSON.stringify({
125127
default: {
126128
host: url.hostname,

0 commit comments

Comments
 (0)