Skip to content

Check for 404 before redirecting on no-extension paths #972

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

Merged
merged 5 commits into from
Jul 28, 2025

Conversation

lovasoa
Copy link
Collaborator

@lovasoa lovasoa commented Jul 26, 2025

The commit improves routing logic by checking if a path would result in
a 404

fixes #971 before adding a
trailing slash. This prevents unnecessary redirects when a custom 404
handler exists.

The commit improves routing logic by checking if a path would result in
a 404

fixes #971 before adding a
trailing slash. This prevents unnecessary redirects when a custom 404
handler exists.
@lovasoa
Copy link
Collaborator Author

lovasoa commented Jul 26, 2025

@cursor review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no bugs!


Bugbot free trial expires on August 9, 2025
Learn more in the Cursor dashboard.

lovasoa and others added 4 commits July 28, 2025 09:54
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
The shorter code more clearly handles finding files with .sql extensions
and decides whether to add trailing slashes based on index file
presence.
@lovasoa lovasoa merged commit 3312556 into main Jul 28, 2025
10 checks passed
@lovasoa lovasoa deleted the 404-without-trailing-slash branch July 28, 2025 15:54
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.

pages handled by a 404.sql should not redirect to add a trailing slash
1 participant