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

plugins/rest/aws: Include port in Host header #2572

Merged
merged 1 commit into from
Jul 22, 2020

Conversation

patrick-east
Copy link
Contributor

The AWS v4 signing feature for bundle requests would automatically
add a Host header by using the URL hostname. This would break for
URLs that specified a port number (eg: https://127.0.0.1:9000/). That
causes issues with sending a valid request.

This commit changes to use the URL.Host which will have the full
host:port string, when a port was specified.

Fixes: #2568
Signed-off-by: Patrick East east.patrick@gmail.com

The AWS v4 signing feature for bundle requests would automatically
add a `Host` header by using the URL hostname. This would break for
URLs that specified a port number (eg: https://127.0.0.1:9000/). That
causes issues with sending a valid request.

This commit changes to use the `URL.Host` which will have the full
`host:port` string, when a port was specified.

Fixes: open-policy-agent#2568
Signed-off-by: Patrick East <east.patrick@gmail.com>
Copy link
Member

@tsandall tsandall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@patrick-east patrick-east merged commit dd68302 into open-policy-agent:master Jul 22, 2020
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.

Specifying the port # in a URL
2 participants