adding header to core; adding header for pleroma

This commit is contained in:
muppeth 2023-06-23 23:39:39 +02:00
parent d5b2c45d16
commit 0341cfd6f6
Signed by: muppeth
GPG Key ID: 0EBC7B9848D04031
2 changed files with 8 additions and 0 deletions

View File

@ -95,6 +95,9 @@ server {
add_header X-Robots-Tag "{{ item.header_robots | default('none') }}";
{% endif %}
{% endif %}
{% if item.header_frame_ancestors is defined and item.header_frame_ancestors == 'true' %}
add_header Content-Security-Policy "frame-ancestors 'self';";
{% endif %}
{% endblock %}
{% block location %}

View File

@ -13,6 +13,11 @@ upstream phoenix {
location / {
proxy_pass http://phoenix;
{% if item.mangane is defined and item.mangane == 'true' %}
proxy_hide_header Content-Security-Policy;
add_header Content-Security-Policy "upgrade-insecure-requests;script-src 'self';connect-src 'self' blob: https://{{ item.name }} wss://{{ item.name }};media-src 'self' https:;img-src 'self' data: blob: https:;default- src 'none';base-uri 'self';frame-ancestors 'none';style-src 'self' 'unsafe-inline';font-src 'self';manifest-src 'self';" always;
{% endif %}
}
location ~ ^/(media|proxy) {