44 lines
1.5 KiB
Elixir
44 lines
1.5 KiB
Elixir
import Config
|
|
|
|
# Note we also include the path to a cache manifest
|
|
# containing the digested version of static files. This
|
|
# 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 :who_need_help, WhoNeedHelpWeb.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.
|
|
force_ssl_hosts =
|
|
case System.get_env("WNH_E2E_SSL_EXCLUDE_HOST") do
|
|
nil -> ["localhost", "127.0.0.1"]
|
|
"" -> ["localhost", "127.0.0.1"]
|
|
"proxy" -> ["localhost", "127.0.0.1", "proxy"]
|
|
other -> raise "unsupported WNH_E2E_SSL_EXCLUDE_HOST: #{inspect(other)}"
|
|
end
|
|
|
|
config :who_need_help, :e2e_routes, System.get_env("WNH_E2E_SSL_EXCLUDE_HOST") == "proxy"
|
|
|
|
config :who_need_help, WhoNeedHelpWeb.Endpoint,
|
|
force_ssl: [
|
|
rewrite_on: [:x_forwarded_proto],
|
|
exclude: [
|
|
paths: ["/healthz/live", "/healthz/ready"],
|
|
hosts: force_ssl_hosts
|
|
]
|
|
]
|
|
|
|
# Configure Swoosh API Client
|
|
config :swoosh, api_client: Swoosh.ApiClient.Req
|
|
|
|
# Disable Swoosh Local Memory Storage
|
|
config :swoosh, local: false
|
|
|
|
# Do not print debug messages in production
|
|
config :logger, level: :info
|
|
|
|
# Runtime production configuration, including reading
|
|
# of environment variables, is done on config/runtime.exs.
|