Skip to content
Snippets Groups Projects
Verified Commit ea105892 authored by shibayashi's avatar shibayashi
Browse files

Use url[:scheme] instead of protocol to determine if https is enabled

parent 39548c38
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,7 @@ defmodule Pleroma.Plugs.HTTPSecurityPlug do
end
defp csp_string do
protocol = Config.get([Pleroma.Web.Endpoint, :protocol])
scheme = Config.get([Pleroma.Web.Endpoint, :url])[:scheme]
[
"default-src 'none'",
......@@ -46,7 +46,7 @@ defmodule Pleroma.Plugs.HTTPSecurityPlug do
"script-src 'self'",
"connect-src 'self' " <> String.replace(Pleroma.Web.Endpoint.static_url(), "http", "ws"),
"manifest-src 'self'",
if protocol == "https" do
if scheme == "https" do
"upgrade-insecure-requests"
end
]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment