We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e859ee commit 1fbd90eCopy full SHA for 1fbd90e
1 file changed
src/aws/resolve.rs
@@ -49,7 +49,12 @@ impl From<Error> for crate::Error {
49
pub async fn resolve_bucket_region(bucket: &str, client_options: &ClientOptions) -> Result<String> {
50
use http::StatusCode;
51
52
- let endpoint = format!("https://{bucket}.s3.amazonaws.com");
+ // S3's wildcard TLS cert (*.s3.amazonaws.com) only covers one DNS label. Use path-style for dotted names.
53
+ let endpoint = if bucket.contains('.') {
54
+ format!("https://s3.amazonaws.com/{bucket}")
55
+ } else {
56
+ format!("https://{bucket}.s3.amazonaws.com")
57
+ };
58
59
let client = client_options.client()?;
60
0 commit comments