<
10000
div class="gh-header-show ">
improve S3 vhost matching on any domain #7870
Merged
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.
While testing lambda transparent endpoint injection, @thrau came across the issue that we were too restrictive with our domain matching. This is also part of @simonrw #7774, and should simplify the logic concerning matching on external hostname. @whummer also came across the new provider issue at the same time today.
This PR is building on the new test Waldemar implemented, and add more scenarios where we should properly match the route. This should be merged right after #7868.
The only question I have is: iss3.localhost.localstack.cloud:{edge_port}
always resolvable from LocalStack? Or is it safer to targetlocalhost
when proxying the request to ourselves? I'd rather targets3.localhost.localstack.cloud:{edge_port}
as the service parser will match more effectively against S3 thanlocalhost
.edit: after checking with Thomas and Waldemar, it's faster to use
localhost
for the loopback network device. So we're target the request tolocalhost
, but set theHost
header tos3.localhost.localstack.cloud:{edge_port}
to allow the service name parser to short-circuit and quickly know it's an S3 request.