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

Add MOTO_DISABLE_GLOBAL_CORS for disabling wildcard CORS #8409

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

kangasta
Copy link
Contributor

No description provided.

Copy link
Collaborator

@bblommers bblommers left a comment

Choose a reason for hiding this comment

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

Hi @kangasta! This makes sense - having a 'strict' mode where CORS is only enabled when configured can be useful, and this looks like the right approach.

Would you mind merging in the latest master? That should hopefully fix the build/linter.

@bblommers bblommers linked an issue Jan 5, 2025 that may be closed by this pull request
@kangasta kangasta force-pushed the MOTO_DISABLE_GLOBAL_CORS branch from 5110e9f to 8af0936 Compare January 7, 2025 21:56
@kangasta
Copy link
Contributor Author

kangasta commented Jan 7, 2025

Thank you for the feedback 👍

I rebased this on top of master and added a testcase for the DISABLE_GLOBAL_CORS setting.

@kangasta kangasta force-pushed the MOTO_DISABLE_GLOBAL_CORS branch from 6a2d51a to 608d212 Compare January 7, 2025 22:11
@kangasta kangasta marked this pull request as ready for review January 7, 2025 22:32
Copy link

codecov bot commented Jan 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.62%. Comparing base (699b55e) to head (608d212).
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8409   +/-   ##
=======================================
  Coverage   92.62%   92.62%           
=======================================
  Files        1225     1225           
  Lines      105708   105711    +3     
=======================================
+ Hits        97916    97919    +3     
  Misses       7792     7792           
Flag Coverage Δ
servertests 27.75% <100.00%> (+<0.01%) ⬆️
unittests 92.60% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kangasta kangasta requested a review from bblommers January 10, 2025 09:14
Copy link
Collaborator

@bblommers bblommers left a comment

Choose a reason for hiding this comment

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

LGTM - thank you for adding this feature @kangasta!

@bblommers bblommers added this to the 5.0.27 milestone Jan 10, 2025
@bblommers bblommers merged commit 92b2c5c into getmoto:master Jan 10, 2025
53 checks passed
@kangasta kangasta deleted the MOTO_DISABLE_GLOBAL_CORS branch January 10, 2025 20:39
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.

Empty S3 Bucket CORS is overriden by moto server wildcard CORS
2 participants