mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #287] [MERGED] Block access to .vite/ build metadata in production server #446
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#446
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/287
Author: @southpolesteve
Created: 3/6/2026
Status: ✅ Merged
Merged: 3/6/2026
Merged by: @southpolesteve
Base:
main← Head:fix/block-internal-build-paths📝 Commits (1)
857f2d7Block access to .vite/ build metadata in production server📊 Changes
2 files changed (+21 additions, -0 deletions)
View changed files
📝
packages/vinext/src/server/prod-server.ts(+8 -0)📝
tests/pages-router.test.ts(+13 -0)📄 Description
Summary
.vite/directory in the client build output contains build manifests (ssr-manifest.json,manifest.json) and other artifacts that should not be publicly accessible. ThetryServeStatic()function had no filtering for these paths.tryServeStatic()that rejects requests to.vite/paths after URL decoding, which also handles encoded variants like/%2Evite/.Changes
packages/vinext/src/server/prod-server.ts: Added.vite/path check intryServeStatic()afterdecodeURIComponentto block direct and encoded access to build metadata.tests/pages-router.test.ts: Two new tests verifying.vite/ssr-manifest.jsonreturns 404 for both direct and percent-encoded paths.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.