Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use shared helper for file extensions #13223

Merged
merged 2 commits into from
Feb 12, 2025
Merged

fix: use shared helper for file extensions #13223

merged 2 commits into from
Feb 12, 2025

Conversation

ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Feb 12, 2025

Changes

When handling redirects for trailing slashes, we need to skip assets. We do this by checking for a file extension. Previously the Node adapter was using its own regex for this when serving static files, and was missing some edge cases. This PR changes it to use the shared hasFileExtension helper.

Fixes #13222

Testing

Adds test cases

Docs

Copy link

changeset-bot bot commented Feb 12, 2025

🦋 Changeset detected

Latest commit: 205fc2f

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: integration Related to any renderer integration (scope) label Feb 12, 2025
@ascorbic ascorbic self-assigned this Feb 12, 2025
@ascorbic ascorbic merged commit 23094a1 into main Feb 12, 2025
15 checks passed
@ascorbic ascorbic deleted the no-redir-woff branch February 12, 2025 10:34
@astrobot-houston astrobot-houston mentioned this pull request Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: integration Related to any renderer integration (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

trailingSlash: "always" causes 301 redirects on file assets
2 participants