🔒️ fix: prevent malformed CSP header

main
welpo 2 years ago
parent 5dcd605801
commit 54ae781352
No known key found for this signature in database
GPG Key ID: A2F978CF4EC1F5A6

@ -45,10 +45,14 @@
<meta http-equiv="Content-Security-Policy" <meta http-equiv="Content-Security-Policy"
content="default-src 'self' content="default-src 'self'
{% if config.extra.allowed_domains %} {%- if config.extra.allowed_domains -%}
;
{%- for domain in config.extra.allowed_domains -%} {%- for domain in config.extra.allowed_domains -%}
{{ domain.directive }} {{ domain.domains | join(sep=' ') }}; {{ domain.directive }} {{ domain.domains | join(sep=' ') }}
{%- if not loop.last -%}
;
{%- endif -%}
{%- endfor -%} {%- endfor -%}
{% endif %}"> {%- endif -%}">
</head> </head>

Loading…
Cancel
Save