From f8b357d2e6a9a55977e9a28efcd66870320b1e78 Mon Sep 17 00:00:00 2001 From: Sergei Turukin Date: Fri, 21 Feb 2025 12:54:28 -0600 Subject: [PATCH] Fix object store for custom endpoint AWS S3 builder uses dedicated setting to allow http. Parse endpoint and enable if it isn't https. --- crates/control_plane/src/models/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/control_plane/src/models/mod.rs b/crates/control_plane/src/models/mod.rs index 62ea71c76..bfc23e21b 100644 --- a/crates/control_plane/src/models/mod.rs +++ b/crates/control_plane/src/models/mod.rs @@ -273,6 +273,11 @@ impl StorageProfile { if let Some(endpoint) = &self.endpoint { builder = builder.with_endpoint(endpoint.clone()); + + let url = Url::parse(endpoint).context(error::InvalidEndpointUrlSnafu { + url: endpoint.clone(), + })?; + builder = builder.with_allow_http(url.scheme() == "http"); } if let Some(credentials) = &self.credentials {