Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ae8fab3

Browse files
committed
fix: expect renamed debug headers
1 parent f3e24b1 commit ae8fab3

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

‎edge-runtime/lib/response.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ export const buildResponse = async ({
161161

162162
// Remove Netlify internal headers
163163
const headers = new Headers(
164-
[...request.headers.entries()].filter(([key]) => !key.startsWith('x-nf-')),
164+
[...request.headers.entries()].filter(
165+
([key]) => !key.startsWith('x-nf-') && !key.startsWith('debug-x-nf-'),
166+
),
165167
)
166168
if (request.body && !request.bodyUsed) {
167169
// This is not ideal, but streaming to an external URL doesn't work

‎tests/utils/fixture.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -473,17 +473,17 @@ export async function invokeEdgeFunction(
473473

474474
// Checkout the stargate headers: https://github.com/netlify/stargate/blob/dc8adfb6e91fa0a2fb00c0cba06e4e2f9e5d4e4d/proxy/deno/edge.go#L1142-L1170
475475
headers: {
476-
'x-nf-edge-functions': functionsToInvoke.join(','),
477-
'x-nf-deploy-id': ctx.deployID,
478-
'x-nf-site-info': Buffer.from(
476+
'debug-x-nf-edge-functions': functionsToInvoke.join(','),
477+
'debug-x-nf-deploy-id': ctx.deployID,
478+
'debug-x-nf-site-info': Buffer.from(
479479
JSON.stringify({ id: ctx.siteID, name: 'Test Site', url: 'https://example.com' }),
480480
).toString('base64'),
481-
'x-nf-blobs-info': Buffer.from(
481+
'debug-x-nf-blobs-info': Buffer.from(
482482
JSON.stringify({ url: `http://${ctx.blobStoreHost}`, token: BLOB_TOKEN }),
483483
).toString('base64'),
484-
'x-nf-passthrough': 'passthrough',
485-
'x-nf-passthrough-host': passthroughHost,
486-
'x-nf-passthrough-proto': 'http:',
484+
'debug-x-nf-passthrough': 'passthrough',
485+
'debug-x-nf-passthrough-host': passthroughHost,
486+
'debug-x-nf-passthrough-proto': 'http:',
487487
'x-nf-request-id': v4(),
488488
...options.headers,
489489
},

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /