From 374535c870399eea60438bac6877f25dbdef1105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20R=20Pearson?= Date: Tue, 30 Dec 2025 11:53:54 +0000 Subject: [PATCH] Fix custom S3 endpoint config (#199) When using the standard AWS S3 service, the `nil` values in `s3_scheme`, `s3_host` and `s3_port` create problems. --- config/runtime.exs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config/runtime.exs b/config/runtime.exs index d1e0476..4f3b500 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -261,7 +261,11 @@ config :ex_aws, access_key_id: s3_access_key_id, secret_access_key: s3_secret_access_key, region: s3_region, - normalize_path: false, - s3: [scheme: s3_scheme, host: s3_host, port: s3_port] + normalize_path: false + +if s3_scheme && s3_host do + config :ex_aws, + s3: [scheme: s3_scheme, host: s3_host, port: s3_port] +end config :swoosh, :api_client, Swoosh.ApiClient.Finch