2022-03-06 19:47:09 +04:00
|
|
|
server {
|
2022-03-06 21:27:43 +04:00
|
|
|
listen 443 ssl http2;
|
2023-08-01 16:44:30 +04:00
|
|
|
listen 8094; # Tor I2P
|
2023-04-24 01:01:35 +04:00
|
|
|
listen [300:a98d:d6d0:8a08::c]:80; # Yggdrasil
|
2022-03-06 19:47:09 +04:00
|
|
|
|
2023-02-23 18:16:06 +04:00
|
|
|
server_name upload.arav.su upload.arav.i2p;
|
2022-03-06 21:27:43 +04:00
|
|
|
access_log /var/log/nginx/dwelling/upload.log main if=$nolog;
|
2022-03-06 19:47:09 +04:00
|
|
|
|
2023-02-23 18:16:06 +04:00
|
|
|
ssl_certificate /etc/letsencrypt/live/arav.su/fullchain.pem;
|
|
|
|
ssl_certificate_key /etc/letsencrypt/live/arav.su/privkey.pem;
|
2022-03-06 19:47:09 +04:00
|
|
|
|
|
|
|
|
2022-03-06 21:27:43 +04:00
|
|
|
add_header Content-Security-Policy "default-src 'self'; script-src 'none'; style-src 'self' 'unsafe-inline'; img-src 'self'; media-src 'self'; object-src 'none'; frame-src 'none'; frame-ancestors 'none'; font-src 'self'; form-action 'self'";
|
|
|
|
add_header X-Frame-Options "DENY";
|
|
|
|
add_header X-Content-Type-Options "nosniff";
|
|
|
|
add_header X-XSS-Protection "1; mode=block";
|
|
|
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
|
2023-08-01 16:44:30 +04:00
|
|
|
add_header Onion-Location "http://4usftbmjpfexkr2x5xbp5ukmygpmg4fgrnx2wbifsexqctooz5hmviyd.onion$request_uri";
|
2022-03-06 19:47:09 +04:00
|
|
|
|
|
|
|
|
2022-03-06 21:27:43 +04:00
|
|
|
location / {
|
2023-02-23 18:16:06 +04:00
|
|
|
proxy_pass http://unix:/var/run/dwelling-upload/sock;
|
2022-06-13 19:12:21 +04:00
|
|
|
proxy_buffering off;
|
|
|
|
|
2022-03-06 22:33:23 +04:00
|
|
|
proxy_set_header Host $host;
|
2022-03-06 21:27:43 +04:00
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
}
|
2022-03-06 19:47:09 +04:00
|
|
|
}
|