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 %}
|
{% for item in location.options %}
|
||||||
{{ item }}
|
{{ item }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if location.headers is defined %}
|
{% if location.headers is defined %}
|
||||||
{% for item in location.headers %}
|
{% for item in location.headers %}
|
||||||
{% if item.secure_site is defined %}
|
{% if item.secure_site is defined %}
|
||||||
add_header X-Download-Options noopen;
|
add_header X-Download-Options noopen;
|
||||||
|
|
|
@ -9,13 +9,16 @@ map $http_upgrade $connection_upgrade {
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block location %}
|
{% block location %}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
root {{ item.root }};
|
root {{ item.root }};
|
||||||
}
|
}
|
||||||
|
|
||||||
location /server {
|
location /server {
|
||||||
proxy_pass {{ item.proto }}://{{ item.server }}:{{ item.port }};
|
proxy_pass {{ item.proto }}://{{ item.server }}:{{ item.port }};
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection $connection_upgrade;
|
proxy_set_header Connection $connection_upgrade;
|
||||||
}
|
}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
|
|
||||||
{% block extra_upstreams %}
|
{% block extra_upstreams %}
|
||||||
|
|
||||||
proxy_cache_path /tmp/pleroma-media-cache levels=1:2 keys_zone=pleroma_media_cache:10m max_size=10g
|
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;
|
||||||
inactive=720m use_temp_path=off;
|
|
||||||
|
|
||||||
upstream phoenix {
|
upstream phoenix {
|
||||||
server {{ item.upstream_name }}:4000 max_fails=5 fail_timeout=60s;
|
server {{ item.upstream_name }}:4000 max_fails=5 fail_timeout=60s;
|
||||||
|
@ -31,10 +30,11 @@ upstream phoenix {
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block app_specific %}
|
{% block app_specific %}
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Connection "upgrade";
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -15,9 +15,12 @@
|
||||||
proxy_cookie_path / "/; secure; HttpOnly; SameSite=strict";
|
proxy_cookie_path / "/; secure; HttpOnly; SameSite=strict";
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if item.root_custom_headers is defined %}
|
{% if item.root_custom_headers is defined %}
|
||||||
{% for header in item.root_custom_headers %}
|
|
||||||
|
|
||||||
#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' %}
|
{% if header.permission_policy is defined and header.permission_policy == 'none' %}
|
||||||
{% else %}
|
{% else %}
|
||||||
add_header Permissions-Policy "geolocation=(),interest-cohort=()";
|
add_header Permissions-Policy "geolocation=(),interest-cohort=()";
|
||||||
|
@ -54,7 +57,7 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
add_header X-Robots-Tag "{{ header.robots | default('none') }}";
|
add_header X-Robots-Tag "{{ header.robots | default('none') }}";
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue