Skip to content

Conversation

@Mirza-Samad-Ahmed-Baig
Copy link

This commit fixes a Cross-Origin Resource Sharing (CORS) vulnerability by restricting the allow_origins in CORSMiddleware to an empty list. Previously, it was set to ["*"], allowing access from any origin, which is a security risk. By setting it to an empty list, CORS is effectively disabled by default, providing a more secure configuration. Users can then explicitly configure trusted origins as needed.

This commit fixes a Cross-Origin Resource Sharing (CORS) vulnerability by restricting the `allow_origins` in `CORSMiddleware` to an empty list. Previously, it was set to `["*"]`, allowing access from any origin, which is a security risk. By setting it to an empty list, CORS is effectively disabled by default, providing a more secure configuration. Users can then explicitly configure trusted origins as needed.
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.

1 participant