From 2196ab57e0a2e3fb195efeb850c930dca0b59d07 Mon Sep 17 00:00:00 2001 From: Aaron Tinio Date: Mon, 4 Dec 2023 18:08:33 +0800 Subject: [PATCH] Add a note in generated configs about compile time :force_ssl config (#5653) --- installer/templates/phx_single/config/runtime.exs | 4 ++-- .../phx_umbrella/apps/app_name_web/config/runtime.exs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/installer/templates/phx_single/config/runtime.exs b/installer/templates/phx_single/config/runtime.exs index 1581db23c4..11069c6ec2 100644 --- a/installer/templates/phx_single/config/runtime.exs +++ b/installer/templates/phx_single/config/runtime.exs @@ -74,8 +74,8 @@ if config_env() == :prod do # "priv/ssl/server.key". For all supported SSL configuration # options, see https://hexdocs.pm/plug/Plug.SSL.html#configure/1 # - # We also recommend setting `force_ssl` in your endpoint, ensuring - # no data is ever sent via http, always redirecting to https: + # We also recommend setting `force_ssl` in your config/prod.exs, + # ensuring no data is ever sent via http, always redirecting to https: # # config :<%= @web_app_name %>, <%= @endpoint_module %>, # force_ssl: [hsts: true] diff --git a/installer/templates/phx_umbrella/apps/app_name_web/config/runtime.exs b/installer/templates/phx_umbrella/apps/app_name_web/config/runtime.exs index 8b85007bd5..57bd5a022e 100644 --- a/installer/templates/phx_umbrella/apps/app_name_web/config/runtime.exs +++ b/installer/templates/phx_umbrella/apps/app_name_web/config/runtime.exs @@ -55,8 +55,8 @@ config :<%= @web_app_name %>, <%= @endpoint_module %>, # "priv/ssl/server.key". For all supported SSL configuration # options, see https://hexdocs.pm/plug/Plug.SSL.html#configure/1 # -# We also recommend setting `force_ssl` in your endpoint, ensuring -# no data is ever sent via http, always redirecting to https: +# We also recommend setting `force_ssl` in your config/prod.exs, +# ensuring no data is ever sent via http, always redirecting to https: # # config :<%= @web_app_name %>, <%= @endpoint_module %>, # force_ssl: [hsts: true]