forked from deepStateMirrors/tabi
🔒️ fix: prevent malformed CSP header
This commit is contained in:
parent
5dcd605801
commit
54ae781352
1 changed files with 7 additions and 3 deletions
|
@ -45,10 +45,14 @@
|
|||
|
||||
<meta http-equiv="Content-Security-Policy"
|
||||
content="default-src 'self'
|
||||
{% if config.extra.allowed_domains %}
|
||||
{%- if 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 -%}
|
||||
{% endif %}">
|
||||
{%- endif -%}">
|
||||
|
||||
</head>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue