diff --git a/app.json b/app.json index 2ab1f0281..181d34eda 100644 --- a/app.json +++ b/app.json @@ -24,9 +24,13 @@ "description": "Where this website will be running (probably .herokuapp.com)" }, "PUBLIC_PORT": { - "description": "HTTPS port number on PUBLIC_HOST", + "description": "Port number on PUBLIC_HOST", "value": "443" }, + "PUBLIC_PROTOCOL": { + "description": "Protocol to use when connecting to PUBLIC_HOST:PUBLIC_PORT", + "value": "https" + }, "SECRET_KEY_BASE": { "description": "A secret key for verifying the integrity of cookies", "generator": "secret" diff --git a/config/prod.secret.exs b/config/prod.secret.exs index 25a36f03c..df94632d9 100644 --- a/config/prod.secret.exs +++ b/config/prod.secret.exs @@ -11,7 +11,7 @@ config :bors, BorsNG.Endpoint, http: [port: {:system, "PORT"}], url: [ host: {:system, "PUBLIC_HOST"}, - scheme: "https", + scheme: {:system, "PUBLIC_PROTOCOL", "https"}, port: {:system, :integer, "PUBLIC_PORT", 443} ], check_origin: false,