mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #230] [CLOSED] docs: add security-hardened proxy.ts example and README section #404
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#404
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/230
Author: @apuodesu
Created: 3/3/2026
Status: ❌ Closed
Base:
main← Head:docs/security-hardening-proxy-example📝 Commits (1)
ec65b76docs: add security-hardened proxy.ts example and README section📊 Changes
2 files changed (+56 additions, -0 deletions)
View changed files
📝
README.md(+9 -0)➕
examples/app-router-cloudflare/proxy.ts(+47 -0)📄 Description
Summary
Add a production-ready
proxy.tsexample toexamples/app-router-cloudflare/and a corresponding "Security hardening" section to the README.Motivation
vinext v0.0.18 has strong built-in protections (URL normalization, path traversal prevention, internal header stripping, image endpoint validation). However, there's no guidance for users on adding security response headers or configuring explicit proxy route matchers for production deployments.
After deploying a vinext app to production (soulo.ai), I found that users benefit from a ready-to-use proxy template that adds:
X-Content-Type-Options,X-Frame-Options,Referrer-Policy,Permissions-Policy%25xxand%5cpatterns as defense-in-depth/api/*Changes
examples/app-router-cloudflare/proxy.ts— New file. Documented, minimal, copy-pasteable security proxyREADME.md— New "Security hardening" section after "Known limitations" pointing to the exampleTesting
Deployed and verified on production (
soulo.ai):%2e%2epath traversal returns 400🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.