Skip to content

Commit 3c5e50e

Browse files
rampage644eadgbear
authored andcommitted
Fix object store for custom endpoint (#295)
AWS S3 builder uses dedicated setting to allow http. Parse endpoint and enable if it isn't https.
1 parent 1b5e939 commit 3c5e50e

File tree

1 file changed

+5
-0
lines changed
  • crates/control_plane/src/models

1 file changed

+5
-0
lines changed

crates/control_plane/src/models/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,11 @@ impl StorageProfile {
273273

274274
if let Some(endpoint) = &self.endpoint {
275275
builder = builder.with_endpoint(endpoint.clone());
276+
277+
let url = Url::parse(endpoint).context(error::InvalidEndpointUrlSnafu {
278+
url: endpoint.clone(),
279+
})?;
280+
builder = builder.with_allow_http(url.scheme() == "http");
276281
}
277282

278283
if let Some(credentials) = &self.credentials {

0 commit comments

Comments
 (0)