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

express 5 router wildcard does not work as documented #1408

Open
david-gang opened this issue Mar 16, 2023 · 1 comment
Open

express 5 router wildcard does not work as documented #1408

david-gang opened this issue Mar 16, 2023 · 1 comment
Labels
5.x Docs for 5.x version

Comments

@david-gang
Copy link

david-gang commented Mar 16, 2023

Hi,

The following does not work as written in the documentation:
https://expressjs.com/en/5x/api.html

app.all('*', requireAuthentication, loadUser)

This is because you are at a newer version of path-to-regexp

https://github.com/pillarjs/path-to-regexp#compatibility-with-express--4x

so please update the documentation because this works

app.all('(.*)', requireAuthentication, loadUser)

I think that also the migration doc should reflect this change.

Thanks

@dougwilson dougwilson transferred this issue from expressjs/express Mar 16, 2023
@david-gang
Copy link
Author

@dougwilson I could open a PR with the documentation changes. English is not my mother tongue so i would prefer that a native english speaker will review the PR. What do you think ?

@crandmck crandmck added the 5.x Docs for 5.x version label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.x Docs for 5.x version
Projects
None yet
Development

No branches or pull requests

2 participants