This commit is contained in:
DarkCat09 2024-06-26 16:39:11 +04:00
parent d3c15bce86
commit eb6a4bde5b
Signed by: DarkCat09
GPG key ID: 0A26CD5B3345D6E3
8 changed files with 35 additions and 0 deletions

1
s/cors Normal file
View file

@ -0,0 +1 @@
add_header Access-Control-Allow-Origin * always;

2
s/listen Normal file
View file

@ -0,0 +1,2 @@
listen 443 ssl;
listen [::]:443 ssl;

5
s/matrix Normal file
View file

@ -0,0 +1,5 @@
location /.well-known/matrix/ {
alias /var/www/.well-known/matrix/;
include s/cors;
add_header Content-Type application/json;
}

4
s/reverse Normal file
View file

@ -0,0 +1,4 @@
proxy_pass http://$upstream;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Connection "";

17
s/static Normal file
View file

@ -0,0 +1,17 @@
location ~* \.(?:manifest|appcache|html?|xml|json)$ {
expires -1;
}
location ~* \.(?:jpe?g|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
expires 1M;
add_header Cache-Control "public";
}
location ~* \.(?:css|js)$ {
expires 1y;
add_header Cache-Control "public";
}
location ~ /\.ht {
deny all;
}

3
s/webapp Normal file
View file

@ -0,0 +1,3 @@
location / {
try_files $uri $uri/ /index.html$is_args$args;
}

2
s/websocket Normal file
View file

@ -0,0 +1,2 @@
proxy_set_header Connection "upgrade";
proxy_set_header Upgrade $http_upgrade;

1
s/xfwd Normal file
View file

@ -0,0 +1 @@
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;