-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Default S3 endpoint scheme to HTTPS when not specified #127489
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
Changes from 5 commits
4abfae7
3f238d1
3bee66f
d3f7594
d3836c4
3b81a01
0365fda
b84cf5e
9d42d86
14ed87f
11fd206
28f530f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -254,7 +254,14 @@ protected S3ClientBuilder buildClientBuilder(S3ClientSettings clientSettings, Sd | |
| } | ||
|
|
||
| if (Strings.hasLength(clientSettings.endpoint)) { | ||
| s3clientBuilder.endpointOverride(URI.create(clientSettings.endpoint)); | ||
| String endpoint = clientSettings.endpoint; | ||
| if ((endpoint.startsWith("http://") || endpoint.startsWith("https://")) == false) { | ||
| // Default protocol to https if not specified | ||
nicktindall marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| // See https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/client-configuration.html#client-config-other-diffs | ||
| endpoint = "https://" + endpoint; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another minor comment: It might be useful to have an INFO log here? If the cluster was relying on an explicit There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a good point, I'll add one There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added in d3836c4 |
||
| LOGGER.info("Defaulting to https for endpoint with no scheme [{}]", clientSettings.endpoint); | ||
|
||
| } | ||
| s3clientBuilder.endpointOverride(URI.create(endpoint)); | ||
| } | ||
|
|
||
| return s3clientBuilder; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.