Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions installer/templates/phx_single/config/prod.exs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@ import Config
config :<%= @web_app_name %>, <%= @endpoint_module %>, cache_static_manifest: "priv/static/cache_manifest.json"

<% end %># Force using SSL in production. This also sets the "strict-security-transport" header,
# also known as HSTS. `:force_ssl` is required to be set at compile-time.
config :<%= @web_app_name %>, <%= @endpoint_module %>, force_ssl: [rewrite_on: [:x_forwarded_proto]]<%= if @mailer do %>
# 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 :<%= @web_app_name %>, <%= @endpoint_module %>,
force_ssl: [rewrite_on: [:x_forwarded_proto]],
exclude: [
# paths: ["/health"],
hosts: ["localhost", "127.0.0.1"]
]<%= if @mailer do %>

# Configure Swoosh API Client
config :swoosh, api_client: Swoosh.ApiClient.Req
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,11 @@ config :<%= @web_app_name %>, <%= @endpoint_module %>,
cache_static_manifest: "priv/static/cache_manifest.json"

# Force using SSL in production. This also sets the "strict-security-transport" header,
# also known as HSTS. `:force_ssl` is required to be set at compile-time.
config :<%= @web_app_name %>, <%= @endpoint_module %>, force_ssl: [rewrite_on: [:x_forwarded_proto]]
# 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 :<%= @web_app_name %>, <%= @endpoint_module %>,
force_ssl: [rewrite_on: [:x_forwarded_proto]],
exclude: [
# paths: ["/health"],
hosts: ["localhost", "127.0.0.1"]
]