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

Empty S3 Bucket CORS is overriden by moto server wildcard CORS #8410

Open
kangasta opened this issue Dec 16, 2024 · 0 comments · May be fixed by #8409
Open

Empty S3 Bucket CORS is overriden by moto server wildcard CORS #8410

kangasta opened this issue Dec 16, 2024 · 0 comments · May be fixed by #8409

Comments

@kangasta
Copy link
Contributor

kangasta commented Dec 16, 2024

Steps to reproduce

  1. Create bucket and an object. Configure a bucket policy to allow anonymous public access.
  2. GET object with Origin header. Response contains CORS headers even though bucket CORS is not defined.

See also objsto Terraform provider test that reproduces this.

Possible solution

Add environment variable to disable configuring wildcard CORS in moto/moto_server/werkzeug_app.py#L275. See #8409 for draft PR.

@kangasta kangasta changed the title Empty S3 Bucket CORS is overriden by moto server CORS Empty S3 Bucket CORS is overriden by moto server wildcard CORS Dec 16, 2024
@bblommers bblommers linked a pull request Jan 5, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants