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

Change default for methods option value to safe values #358

Open
2 tasks done
Fdawgs opened this issue Feb 18, 2025 · 1 comment · May be fixed by #359
Open
2 tasks done

Change default for methods option value to safe values #358

Fdawgs opened this issue Feb 18, 2025 · 1 comment · May be fixed by #359

Comments

@Fdawgs
Copy link
Member

Fdawgs commented Feb 18, 2025

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the issue has not already been raised

Issue

The methods option, which sets the Access-Control-Allow-Methods response header, currently defaults to GET,HEAD,PUT,PATCH,POST,DELETE. This exposes unsafe methods that can modify server state to cross-origin requests, potentially leading to security vulnerabilities if not properly controlled.

It should instead default to CORS-safelisted methods GET,HEAD,POST or be disabled (which is the same as setting it to GET,HEAD,POST).

This would be a breaking change if implemented.

@Uzlopak
Copy link
Contributor

Uzlopak commented Feb 18, 2025

I think you are right. Semver major is imho fine

@Fdawgs Fdawgs linked a pull request Feb 18, 2025 that will close this issue
4 tasks
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 a pull request may close this issue.

2 participants