Disable force_ssl — SSL terminated by Cloudflare tunnel

This commit is contained in:
Graham McIntire 2026-04-02 10:20:43 -05:00
parent 1404923e97
commit bffe3616b5
No known key found for this signature in database
GPG key ID: F4ABF488E6029E59
2 changed files with 4 additions and 9 deletions

View file

@ -10,15 +10,9 @@ config :logger, level: :info
# before starting your production server.
config :microwaveprop, MicrowavepropWeb.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json"
# Force using SSL in production. This also sets the "strict-security-transport" header,
# 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 :microwaveprop, MicrowavepropWeb.Endpoint,
force_ssl: [rewrite_on: [:x_forwarded_proto]],
exclude: [
# paths: ["/health"],
hosts: ["localhost", "127.0.0.1"]
]
# SSL terminated by Cloudflare tunnel — no force_ssl needed.
# config :microwaveprop, MicrowavepropWeb.Endpoint,
# force_ssl: [rewrite_on: [:x_forwarded_proto]]
# Configure Swoosh API Client
config :swoosh, api_client: Swoosh.ApiClient.Req

View file

@ -55,6 +55,7 @@ if config_env() == :prod do
socket_options: maybe_ipv6
config :microwaveprop, MicrowavepropWeb.Endpoint,
# SSL terminated by Cloudflare tunnel; generated URLs still use https
url: [host: host, port: 443, scheme: "https"],
http: [
# Enable IPv6 and bind on all interfaces.