Skip to content

Conversation

@ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Feb 3, 2025

Changes

#13111 removed special handling for endpoint trailing slashes, because they broke trailignSlash=always. However this caused a regression for endpoints that include a file extension. This PR changes the handling for endpoints that include a file extension, to always use trailingSlash: "ignore". This means it will match with and without the extension. I've done it liek this rather than setting to never, because that would be a breakign change. Currently file-based endpoints do obey trailing slash rules, even with file extensions. This is probably a mistake (who wants /sitemap.xml/), but some may rely on it so we'll move any change to Astro 6.

Fixes #13128

Testing

Adds tests

Docs

@changeset-bot
Copy link

changeset-bot bot commented Feb 3, 2025

🦋 Changeset detected

Latest commit: e63ae5d

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 Feb 3, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 3, 2025

CodSpeed Performance Report

Merging #13131 will not alter performance

Comparing trailing-ext (e63ae5d) with main (2a85bd7)

Summary

✅ 6 untouched benchmarks

@ascorbic ascorbic merged commit d60c742 into main Feb 4, 2025
16 checks passed
@ascorbic ascorbic deleted the trailing-ext branch February 4, 2025 09:48
@astrobot-houston astrobot-houston mentioned this pull request Feb 4, 2025
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.

Injected endpoint with dots in pattern should no follow trailingSlash: always

4 participants