mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[GH-ISSUE #414] docs/runtime: warn when external rewrites proxy requests to third-party origins #89
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#89
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?
Originally created by @Divkix on GitHub (Mar 10, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/414
Problem
External rewrites in
next.configact as reverse proxies — vinext fetches the external URL server-side and returns the response to the client. Currently, credential headers (cookie,authorization,x-api-key,proxy-authorization) are forwarded to the external origin without any warning.This is a security concern: developers may not realize that adding an external rewrite silently proxies credentials to a third-party server.
Proposed Solution
next.configrewrites, scan destinations for external URLs. If any are found, emit aconsole.warnlisting the external rewrites and noting that credential headers are forwarded.Additionally, fold in Content-Disposition type validation to sanitize the
contentDispositionTypeconfig value at runtime (default to"inline"unless explicitly set to"attachment").Acceptance Criteria
console.warnemitted at startup when external rewrites are configured