Skip to content

Conversation

@IamLizu
Copy link
Member

@IamLizu IamLizu commented Jun 27, 2025

@IamLizu IamLizu added the docs label Jun 27, 2025
@ctcpip
Copy link
Member

ctcpip commented Jun 27, 2025

express v4 is still supported (and has far more usage than v5 still). therefore, can you please update to show both examples?

@IamLizu IamLizu requested a review from ctcpip June 27, 2025 20:23
For express v5,
```javascript
// Catch every non-root path
app.options('/*splat', cors());
Copy link
Member

Choose a reason for hiding this comment

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

For most users, if not all, the root path is needed, so I think we should remove this.

Suggested change
app.options('/*splat', cors());

Copy link
Member Author

Choose a reason for hiding this comment

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

Example covering root path is also there if you read the next one or two line and both cases are clearly indicated with comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allows CORS for any routes, including OPTIONS: documentation is obsolete

3 participants