From aed28de923818f3045762f9cfead99ee67e3dbbe Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sat, 3 Jan 2026 16:52:28 -0600 Subject: [PATCH] Fix SSL redirect excluding /health endpoint Move exclude option inside force_ssl config so /health endpoint is not redirected to HTTPS (needed for k8s readiness probe). --- config/prod.exs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/config/prod.exs b/config/prod.exs index 58bf3296..1257c310 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -20,10 +20,7 @@ config :towerops, ToweropsWeb.Endpoint, cache_static_manifest: "priv/static/cach # known as HSTS. If you have a health check endpoint, you may want to exclude it below. # Note `:force_ssl` is required to be set at compile-time. config :towerops, ToweropsWeb.Endpoint, - force_ssl: [rewrite_on: [:x_forwarded_proto]], - exclude: [ - paths: ["/health"], - # Runtime production configuration, including reading - # of environment variables, is done on config/runtime.exs. - hosts: ["localhost", "127.0.0.1"] + force_ssl: [ + rewrite_on: [:x_forwarded_proto], + exclude: [paths: ["/health"], hosts: ["localhost", "127.0.0.1"]] ]