fix force_ssl compile-time config mismatch
All checks were successful
deploy / deploy (push) Successful in 3m28s
All checks were successful
deploy / deploy (push) Successful in 3m28s
force_ssl must be set at compile time (in prod.exs), not runtime. Phoenix validates compile-time config at boot and was crashing because the value differed between compile and runtime. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
168b6ce76f
commit
a011169459
@ -5,7 +5,11 @@ import Config
|
||||
# manifest is generated by the `mix assets.deploy` task,
|
||||
# which you should run after static files are built and
|
||||
# before starting your production server.
|
||||
config :berrypod, BerrypodWeb.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json"
|
||||
config :berrypod, BerrypodWeb.Endpoint,
|
||||
cache_static_manifest: "priv/static/cache_manifest.json",
|
||||
# HSTS tells browsers to always use HTTPS for this domain (1 year, include subdomains)
|
||||
# This must be set at compile time, not runtime
|
||||
force_ssl: [hsts: true, rewrite_on: [:x_forwarded_proto]]
|
||||
|
||||
# Configures Swoosh API Client
|
||||
config :swoosh, api_client: Swoosh.ApiClient.Req
|
||||
|
||||
@ -64,9 +64,7 @@ if config_env() == :prod do
|
||||
ip: {0, 0, 0, 0, 0, 0, 0, 0},
|
||||
port: port
|
||||
],
|
||||
secret_key_base: secret_key_base,
|
||||
# HSTS tells browsers to always use HTTPS for this domain (1 year, include subdomains)
|
||||
force_ssl: [hsts: true, rewrite_on: [:x_forwarded_proto]]
|
||||
secret_key_base: secret_key_base
|
||||
|
||||
# ## SSL Support
|
||||
#
|
||||
|
||||
Loading…
Reference in New Issue
Block a user