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

Detect S3 region from non amazon endpoint #1782

Closed

Conversation

fatpat
Copy link

@fatpat fatpat commented Mar 1, 2023

when using S3 endpoints from providers other than amazon the region is not extracted from the endpoint and the first request returns HTTP 400 with AuthorizationHeaderMalformed and the client gather the region from the XML and then retry the request with the correct region.

It would be nice to extract the region from the endpoint instead of having to set it in minio.Options as it's redundant when the region is already in the endpoint.

@harshavardhana
Copy link
Member

You should set the right region for your client constructor. We did it for AWS S3 because they have well defined domains and regions.

We do not want to generalize for all endpoints.

@harshavardhana
Copy link
Member

#1786 This should be what you would want here, so write your own detection patterns here.

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.

None yet

2 participants