From fea2d49bee8b7cb401933cec375acb6ae0f9e6f6 Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Mon, 8 Mar 2021 23:18:38 +0000 Subject: [PATCH] Update the domain docs to show that `force_ssl` needs the `host` option set if you are using a custom domain --- docs/source/domain.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/source/domain.rst b/docs/source/domain.rst index 2c97272..f2849eb 100644 --- a/docs/source/domain.rst +++ b/docs/source/domain.rst @@ -45,3 +45,10 @@ This configures your app to `check the x-forwarded-proto header`_ set by Gigalix For more information on how this works internally, see :ref:`how-tls-works`. .. _`check the x-forwarded-proto header`: https://hexdocs.pm/plug/Plug.SSL.html#module-x-forwarded-proto + +If you are using a custom domain, add that as the :elixir:`host` option, otherwise the redirect will go to https://$APP_NAME.gigalixirapp.com/. + +.. code-block:: elixir + + config :my_app, MyAppWeb.Endpoint, + force_ssl: [rewrite_on: [:x_forwarded_proto], host: "www.example.com"]