-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
AWS4Signer should provide option to set custom host header #2974
Comments
Looks similar to aws/aws-sdk-ruby#2339 |
So the feature request is to not overwrite the It's unusual that this is needed at the AWS4Signer level. You can override the endpoint at the client level with a custom As a workaround, you can use a Just a heads up, the team is focused in working in features for the Java SDK v2, so this has a low chance to be implemented. |
This is weird of AWS4Signer to set host as endpoint . |
Describe the feature
As of now, AWS4Signer extracts host name from end point url and uses it to set the
Host
header and compute hash to sign the request.Ideally, if a host name is provided in the request's
Host
header, AWS4Signer should use that instead.Use Case
In cases where the target host is behind a load balancer/gateway, the final host name will be that of the host which hosts the API (Eg: AWS Neptune
/sparql
API).Clients should be able to set the target host name in header in order for the target host to verify the request.
Proposed Solution
If a host name is provided in the request's
Host
header, AWS4Signer should use that instead of extracting from endpoint url.Other Information
awscurl
command line tool is able to honour the host header.eg:
The below invocation works
Acknowledgements
AWS Java SDK version used
1.11.1009
JDK version used
11.0.16.1
Operating System and version
MacOS Ventura 13.3.1 (22E261)
The text was updated successfully, but these errors were encountered: