Open RobStallion opened 5 years ago
To fix this we just have to add the following line to our config/prod.exs
file.
force_ssl: [rewrite_on: [:x_forwarded_proto]]
Example...
config :your_app, YourAppWeb.Endpoint,
http: [:inet6, port: System.get_env("PORT") || 4000],
url: [host: "example.com", port: 80],
cache_static_manifest: "priv/static/cache_manifest.json",
force_ssl: [rewrite_on: [:x_forwarded_proto]]
Look into how to force a phoenix application to redirect to https if a user goes to a http endpoint.
Example of what we want to recreate...