mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #280] [MERGED] fix: sanitize redirect destination in generated worker entry #439
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#439
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/280
Author: @southpolesteve
Created: 3/6/2026
Status: ✅ Merged
Merged: 3/6/2026
Merged by: @southpolesteve
Base:
main← Head:fix/deploy-redirect-sanitization📝 Commits (1)
3b61c86fix: sanitize redirect destination in generated worker entry📊 Changes
1 file changed (+6 additions, -3 deletions)
View changed files
📝
packages/vinext/src/deploy.ts(+6 -3)📄 Description
Summary
generatePagesRouterWorkerEntry) was not wrapping the final redirect destination insanitizeDestination(), unlike the equivalent code inprod-server.tssanitizeDestinationto the imports fromvinext/config/config-matchersin the generated worker templatesanitizeDestination()to normalize protocol-relative URLs (e.g.//evil.combecomes/evil.com) before setting theLocationheaderThis brings the generated worker entry in line with
prod-server.tswhich already applies this normalization.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.