Small template changes (#40)
Changes to templates: - core - pleroma - proxy - mumble Co-authored-by: muppeth <muppeth@disroot.org> Reviewed-on: #40 Reviewed-by: meaz <meaz@no-reply@disroot.org>
This commit is contained in:
parent
6c96fe5180
commit
79448def24
|
@ -107,7 +107,7 @@ server {
|
|||
{% for item in location.options %}
|
||||
{{ item }}
|
||||
{% endfor %}
|
||||
{% if location.headers is defined %}
|
||||
{% if location.headers is defined %}
|
||||
{% for item in location.headers %}
|
||||
{% if item.secure_site is defined %}
|
||||
add_header X-Download-Options noopen;
|
||||
|
|
|
@ -9,13 +9,16 @@ map $http_upgrade $connection_upgrade {
|
|||
{% endblock %}
|
||||
|
||||
{% block location %}
|
||||
|
||||
location / {
|
||||
root {{ item.root }};
|
||||
}
|
||||
|
||||
location /server {
|
||||
proxy_pass {{ item.proto }}://{{ item.server }}:{{ item.port }};
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
}
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
{% block extra_upstreams %}
|
||||
|
||||
proxy_cache_path /tmp/pleroma-media-cache levels=1:2 keys_zone=pleroma_media_cache:10m max_size=10g
|
||||
inactive=720m use_temp_path=off;
|
||||
proxy_cache_path /tmp/pleroma-media-cache levels=1:2 keys_zone=pleroma_media_cache:10m max_size=10g inactive=720m use_temp_path=off;
|
||||
|
||||
upstream phoenix {
|
||||
server {{ item.upstream_name }}:4000 max_fails=5 fail_timeout=60s;
|
||||
|
@ -31,10 +30,11 @@ upstream phoenix {
|
|||
|
||||
{% endblock %}
|
||||
{% block app_specific %}
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -15,9 +15,12 @@
|
|||
proxy_cookie_path / "/; secure; HttpOnly; SameSite=strict";
|
||||
{% endif %}
|
||||
{% if item.root_custom_headers is defined %}
|
||||
{% for header in item.root_custom_headers %}
|
||||
|
||||
#headers
|
||||
{% for header in item.root_custom_headers %}
|
||||
{{ header }}
|
||||
{% endfor %}
|
||||
{% if header.predef is defined and header.predef == 'none' %}
|
||||
{% else %}
|
||||
{% if header.permission_policy is defined and header.permission_policy == 'none' %}
|
||||
{% else %}
|
||||
add_header Permissions-Policy "geolocation=(),interest-cohort=()";
|
||||
|
@ -54,7 +57,7 @@
|
|||
{% else %}
|
||||
add_header X-Robots-Tag "{{ header.robots | default('none') }}";
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue