http security: allow referrer-policy to be configured

This commit is contained in:
William Pitcock 2018-11-12 15:14:46 +00:00
commit ee5932a504
4 changed files with 22 additions and 2 deletions

View file

@ -15,12 +15,14 @@ defmodule Pleroma.Plugs.HTTPSecurityPlug do
end
defp headers do
referrer_policy = Config.get([:http_security, :referrer_policy])
[
{"x-xss-protection", "1; mode=block"},
{"x-permitted-cross-domain-policies", "none"},
{"x-frame-options", "DENY"},
{"x-content-type-options", "nosniff"},
{"referrer-policy", "same-origin"},
{"referrer-policy", referrer_policy},
{"x-download-options", "noopen"},
{"content-security-policy", csp_string() <> ";"}
]