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).
This commit is contained in:
parent
4216a5b7bf
commit
aed28de923
1 changed files with 3 additions and 6 deletions
|
|
@ -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"]]
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue