move S3 ASF virtual host proxy and refactor#7001
Merged
Conversation
thrau
approved these changes
Oct 10, 2022
Member
thrau
left a comment
There was a problem hiding this comment.
Nice little refactoring! Much cleaner 💯
Contributor
Author
|
@thrau thanks for the review 🙏 Are those CI failures "okay"? |
LocalStack integration with Pro 1 files - 2 1 suites - 2 51m 4s ⏱️ - 25m 22s Results for commit 9a2664f. ± Comparison against base commit 079d5c0a. ♻️ This comment has been updated with latest results. |
21 tasks
cd46736 to
9a2664f
Compare
Member
|
yes i think the ones at the time were ok. i've since rebased the PR on your changes from #6987, hopefully nothing broke! |
Contributor
Author
|
Thanks a lot for the rebase! |
cmoralesmx
pushed a commit
to cmoralesmx/localstack
that referenced
this pull request
Oct 24, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR moves the S3 ASF virtual host proxy (rewriting virtual host addressed bucket requests to path addressed ones).
It also refactors a bit, adding the handler inside a class, allowing to have the rewriting logic inside of it. Also added a bit of logic removing server added headers (by hypercorn), because they would be added twice (once after being proxied, then when returning the actual response).
Added a small test to check that the headers are actually returned once, not sure it should be in s3 but maybe something along the testing the router or proxy, I'm not sure?