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(routing): handle base path with trailing slash 'never' configuration #13598

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dreyfus92
Copy link
Member

@dreyfus92 dreyfus92 commented Apr 10, 2025

Changes

Closes: #13585

  • What does this change?

Fixes routing with base paths when trailingSlash is set to 'never', ensuring requests to '/base' are correctly matched when the base path is set to '/base'. The fix also maintains compatibility with rewrites, with all rewrite tests passing successfully.

Testing

I've added 2 🤏🏻 tests 🫡

Docs

Copy link

changeset-bot bot commented Apr 10, 2025

🦋 Changeset detected

Latest commit: 2bf97ac

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: astro Related to the core `astro` package (scope) label Apr 10, 2025
Copy link

codspeed-hq bot commented Apr 10, 2025

CodSpeed Performance Report

Merging #13598 will not alter performance

Comparing dreyfus92:patch/trailing-slash (2bf97ac) with main (a0774b3)

Summary

✅ 6 untouched benchmarks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Astro.url.pathname returns trailing slash on index page when base is set and trailingSlash is 'never'
1 participant