Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(server): allow dot-prefixed path segments in static files#2013

Open
NullVoxPopuli wants to merge 1 commit into
testem:masterfrom
NullVoxPopuli:fix-dotfile-static-serving
Open

fix(server): allow dot-prefixed path segments in static files#2013
NullVoxPopuli wants to merge 1 commit into
testem:masterfrom
NullVoxPopuli:fix-dotfile-static-serving

Conversation

@NullVoxPopuli
Copy link
Copy Markdown
Contributor

[email protected] (pulled in via Express 5) defaults to dotfiles: 'ignore' and 404s any path with a segment starting with .. [email protected] (Express 4) only rejected when the last segment did, so paths like node_modules/.pnpm/[email protected]/... worked before 3.20 and don't now.

Passes { dotfiles: 'allow' } to both res.sendFile calls in serveStaticFile to restore the pre-3.20 behavior. Adds a fixture (tests/web/.pnpm-like/inside.js) and a test case asserting GET /web/.pnpm-like/inside.js returns its contents.

Closes #2012.

[email protected] (pulled in via Express 5) defaults to dotfiles: 'ignore' and
404s any path with a segment starting with '.'. [email protected] (Express 4)
only rejected when the *last* segment did, so paths like
`node_modules/.pnpm/[email protected]/...` worked before and don't now.
This breaks every pnpm-managed project that serves its build output
through testem.

Passes { dotfiles: 'allow' } to the res.sendFile calls in
serveStaticFile to restore the pre-3.20 behavior.

Closes testem#2012
NullVoxPopuli added a commit to emberjs/ember.js that referenced this pull request May 23, 2026
NullVoxPopuli added a commit to emberjs/ember.js that referenced this pull request May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3.20 500s on any URL with an intermediate dot-segment (eg .pnpm/...)

1 participant