mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #418] [MERGED] docs/runtime: warn on external rewrites, sanitize Content-Disposition #558
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#558
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/418
Author: @Divkix
Created: 3/10/2026
Status: ✅ Merged
Merged: 3/11/2026
Merged by: @james-elicx
Base:
main← Head:docs/external-rewrite-warning📝 Commits (9)
2640c27fix: warn on external rewrites and sanitize Content-Dispositionc9fdd96fix: improve external rewrite warning and add Content-Disposition sanitization test96b2916fix: correct external rewrite warning to reflect actual header forwarding06a869dfix: address PR review feedback on external rewrite warningaffd28efix: refine external rewrite warning wording and add source path assertionsc4a128dfix: strip credential headers from outbound proxy requests8a5f972fix: align app-router credential stripping test with implementationafd7048fix: keep Next.js rewrite forwarding3aeaf02fix: restore Next.js external rewrite header forwarding📊 Changes
6 files changed (+135 additions, -9 deletions)
View changed files
📝
packages/vinext/src/config/next-config.ts(+21 -0)📝
packages/vinext/src/server/image-optimization.ts(+4 -1)📝
packages/vinext/src/server/prod-server.ts(+4 -2)📝
tests/app-router.test.ts(+5 -5)📝
tests/next-config.test.ts(+82 -0)📝
tests/shims.test.ts(+19 -1)📄 Description
Summary
cookie,authorization,proxy-authorization,x-api-key) from outbound proxy requests to external originsnext.configcontains rewrites to external origins, noting that credential headers are strippedcontentDispositionTypein image optimization and prod server to only allow"attachment"(default"inline")Closes #414
Closes #430
Test plan
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.