Skip to content

Added basic cors support - #88

Open
shustinm wants to merge 1 commit into
breuner:masterfrom
shustinm:s3-cors-handler
Open

shustinm wants to merge 1 commit into
breuner:masterfrom
shustinm:s3-cors-handler

Conversation

@shustinm

Copy link
Copy Markdown
Contributor

This PR adds basic support for S3 CORS.

elbencho will not configure the bucket cors, and will only send an Origin header, and expects an Access-Control-Allow-Origin header back (with the same value or *).

Due to current limitations of the implementation, elbencho doesn't validate the response header in PUT or DELTE requests, only GET requests. This is due to a limitation of the current implementation which uses SetHeadersReceivedEventHandler.

This is why GET functions use s3ModeAddCorsHeader and s3ModeThrowOnCorsError, while PUT and DELETE functions just set the header (invoke SetAdditionalCustomHeaderValue directly)

Comment thread Makefile Outdated
@shustinm
shustinm force-pushed the s3-cors-handler branch 4 times, most recently from ab96537 to 6b7ea7f Compare August 18, 2025 18:08
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.

2 participants