54 lines
1.5 KiB
Plaintext
54 lines
1.5 KiB
Plaintext
add_header Onion-Location http://fedi.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion$request_uri;
|
|
add_header X-I2P-Location http://verncc3ifybf2wvag5sgjmpsdp4lcv3ppuvpnlihcgffuqytkaxa.b32.i2p$request_uri;
|
|
|
|
keepalive_timeout 70;
|
|
sendfile on;
|
|
client_max_body_size 80m;
|
|
|
|
root /home/mastodon/live/public;
|
|
error_log /var/log/nginx/mastodon.err;
|
|
|
|
gzip on;
|
|
gzip_disable "msie6";
|
|
gzip_vary on;
|
|
gzip_proxied any;
|
|
gzip_comp_level 6;
|
|
gzip_buffers 16 8k;
|
|
gzip_http_version 1.1;
|
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml image/x-icon;
|
|
|
|
#add_header Strict-Transport-Security "max-age=31536000" always;
|
|
|
|
location / {
|
|
try_files $uri @proxy;
|
|
}
|
|
|
|
location ~ ^/(emoji|packs|system/accounts/avatars|system/media_attachments/files) {
|
|
add_header Cache-Control "public, max-age=31536000, immutable";
|
|
try_files $uri @proxy;
|
|
}
|
|
|
|
location /sw.js {
|
|
add_header Cache-Control "public, max-age=0";
|
|
try_files $uri @proxy;
|
|
}
|
|
|
|
location @proxy {
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header Proxy "";
|
|
proxy_pass_header Server;
|
|
|
|
proxy_pass http://backend;
|
|
proxy_buffering on;
|
|
proxy_redirect off;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
|
|
proxy_cache CACHE;
|
|
proxy_cache_valid 200 7d;
|
|
proxy_cache_valid 410 24h;
|
|
}
|