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

feat: add support for redirecting trailing slashes #90

Closed

Conversation

nigrosimone
Copy link
Contributor

@nigrosimone nigrosimone commented Feb 23, 2025

Express treats URLs with and without a trailing slash as the same route, while µExpress considers them as two distinct route. If you want to standardize the behavior in µExpress, you can enable redirection of URLs with a trailing slash to their version without a trailing slash using redirect trailing slash

also close #87

@nigrosimone nigrosimone mentioned this pull request Feb 23, 2025
Copy link

pkg-pr-new bot commented Feb 23, 2025

Open in Stackblitz

npm i https://pkg.pr.new/dimdenGD/ultimate-express@90

commit: de8b000

@dimdenGD
Copy link
Owner

uExpress should support both trailing slash and no trailing slash (and it already mostly does, except theres a bug that needs to be fixed)

@dimdenGD dimdenGD closed this Feb 23, 2025
@nigrosimone nigrosimone deleted the redirecting-trailing-slashes branch February 23, 2025 16:44
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.

trouble with routes
2 participants