HTTP Security plug: make starting csp string generation more readable
This commit is contained in:
parent
29ff6d414b
commit
27180611df
@ -49,7 +49,7 @@ defp headers do
|
||||
end
|
||||
end
|
||||
|
||||
@csp_start [
|
||||
static_csp_rules = [
|
||||
"default-src 'none'",
|
||||
"base-uri 'self'",
|
||||
"frame-ancestors 'none'",
|
||||
@ -57,9 +57,8 @@ defp headers do
|
||||
"font-src 'self'",
|
||||
"manifest-src 'self'"
|
||||
]
|
||||
|> Enum.join(";")
|
||||
|> Kernel.<>(";")
|
||||
|> List.wrap()
|
||||
|
||||
@csp_start [Enum.join(static_csp_rules, ";") <> ";"]
|
||||
|
||||
defp csp_string do
|
||||
scheme = Config.get([Pleroma.Web.Endpoint, :url])[:scheme]
|
||||
|
Loading…
Reference in New Issue
Block a user