small update to movim template

This commit is contained in:
muppeth 2023-07-02 23:19:43 +02:00
parent 8c92725182
commit 7688f5e400
Signed by: muppeth
GPG Key ID: 0EBC7B9848D04031
1 changed files with 9 additions and 14 deletions

View File

@ -1,11 +1,8 @@
{% if item.pic_cache is defined and item.pic_cache == 'true' %}
fastcgi_cache_path /tmp/nginx_cache levels=1:2 keys_zone=nginx_cache:100m inactive=60m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
#map $http_upgrade $connection_upgrade {
# default upgrade;
# '' close;
# }
{% endif %}
{% extends "core.j2" %}
{% block root %}
@ -46,16 +43,11 @@ fastcgi_cache_key "$scheme$request_method$host$request_uri";
log_not_found off;
}
# location ~* \.(txt|js|css|png|jpe?g|gif|ico|svg)$ {
# expires 30d;
# log_not_found off;
# }
location ~ ^/(README.md|INSTALL|LICENSE|CHANGELOG|UPGRADING)$ {
deny all;
}
location ~ ^/(config|temp|logs)/ {
location ~ ^/(config|temp|log)/ {
deny all;
}
@ -66,8 +58,9 @@ fastcgi_cache_key "$scheme$request_method$host$request_uri";
include fastcgi_params;
}
{% if item.ws is defined and item.ws == 'true' %}
location /ws/ {
proxy_pass {{ item.upstream_proto }}://{{ item.upstream_name }}:{{ item.upstream_port }};
proxy_pass {{ item.upstream_schema }}://{{ item.upstream_name }}:{{ item.upstream_port }};
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
@ -77,7 +70,8 @@ fastcgi_cache_key "$scheme$request_method$host$request_uri";
proxy_set_header X-Forwarded-Proto https;
proxy_redirect off;
}
{% endif %}
{% if item.pic_cache is defined and item.pic_cache == 'true' %}
location /picture {
include fastcgi_params;
@ -87,5 +81,6 @@ fastcgi_cache_key "$scheme$request_method$host$request_uri";
fastcgi_cache_key $request_method$host$request_uri;
fastcgi_cache_valid any 1h;
}
{% endif %}
{% endblock %}