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

Remove Authorization header on redirects? #1884

Open
shays10 opened this issue Jun 4, 2023 · 1 comment
Open

Remove Authorization header on redirects? #1884

shays10 opened this issue Jun 4, 2023 · 1 comment

Comments

@shays10
Copy link

shays10 commented Jun 4, 2023

Hi,

We ran into an issue where we are:

  1. Sending a call to a docker registry /v2/blobs/... backed by a S3 bucket. We're Getting a 302 response with a location to a pre-signed S3 bucket URL.
  2. AHC tries to call the new location and fails. It propagates the original headers to the new request and S3 API doesn't like the fact that there's also an Authorization header for the docker registry.

The redirect is to a different domain, so I'm wondering, what's the preferred solution here?
A new flag where we can control stripping the Authorization headers? Any other solution would probably break existing behavior.

According to the code, it looks like we're always propagating the headers.

For more info, this is exactly the same issue as described here

@hyperxpro
Copy link
Member

Would you like to do a PR?

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

No branches or pull requests

2 participants