Allows CORS for any routes, including OPTIONS: documentation is obsolete
Open
- Dominant language
- JavaScript
- Stars
- 6.2k
- Forks
- 512
- PR merge metrics
- No merged PRs in 30d
Description
### Description
Hi,
Since Express@5, we can no longer use the syntax `*` to apply a middleware to any route (source: https://expressjs.com/en/guide/migrating-5.html#path-syntax)
However, this middleware documentation still uses an example with it: `app.options('*', cors())` (source : https://github.com/expressjs/cors?tab=readme-ov-file#enabling-cors-pre-flight)
Could you update the documentation with the appropriate alternative?
### Expectations
The official alternative to allowing CORS for any route, including OPTIONS requests.
Contributor guide
Assessment
This issue has not been assessed yet.