Update to 2022-02-13 22:00

This commit is contained in:
Daniel Berteaud
2022-02-13 22:00:06 +01:00
parent 1689aa1152
commit f8e97439c5
4 changed files with 10 additions and 4 deletions

View File

@@ -135,8 +135,10 @@ server {
{% endif %}
{% endfor %}
{% if vhost.csp %}
{% if vhost.csp is string and vhost.csp != '' %}
add_header Content-Security-Policy "{{ vhost.csp + (vhost.csp is search('connect-src') and vhost.proxy.websocket) | ternary('', '; connect-src \'self\' wss://' + vhost.name) }}";
{% elif vhost.csp is mapping %}
add_header Content-Security-Policy "{% for csp in vhost.csp.keys() | list %}{{ csp }} {{ vhost.csp[csp] }}{% if not loop.last %}; {% endif %}{% endfor %}";
{% endif %}
{% if vhost.auth == 'llng' or vhost.auth == 'llng_basic' %}