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

Enable optional Redirect Handling Support #2021

Closed

Conversation

shivakumargowda12
Copy link

Copy link
Contributor

@klauspost klauspost left a comment

Choose a reason for hiding this comment

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

I don't want this controlled by an env var, since it triggers re-signing to a different host, it would make requests be signed to a remote controlled host.

While the security aspect is very minimal, it should be determined by the caller application if that risk is acceptable and not be accepted based purely external factors.

Comment on lines +312 to +315
if envValue := os.Getenv("ENABLE_REDIRECT_HANDLING"); envValue == "true" {
clnt.httpClient.CheckRedirect = clnt.redirectHeaders
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Don't add env vars to a library. Add it to the Options.

@harshavardhana
Copy link
Member

Redirect is not supported in S3 API, it simply doesn't work correctly.

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.

3 participants