2026-04-14 10:27:51 +02:00
|
|
|
server {
|
|
|
|
|
listen 80;
|
|
|
|
|
listen [::]:80;
|
|
|
|
|
server_name furtka.org www.furtka.org;
|
|
|
|
|
|
|
|
|
|
root /var/www/furtka.org;
|
|
|
|
|
index index.html;
|
|
|
|
|
|
|
|
|
|
charset utf-8;
|
|
|
|
|
|
2026-04-28 12:09:26 +02:00
|
|
|
gzip on;
|
|
|
|
|
gzip_vary on;
|
|
|
|
|
gzip_min_length 1024;
|
|
|
|
|
gzip_comp_level 6;
|
|
|
|
|
gzip_types
|
|
|
|
|
text/css
|
|
|
|
|
text/plain
|
|
|
|
|
text/xml
|
|
|
|
|
application/javascript
|
|
|
|
|
application/json
|
|
|
|
|
application/xml
|
|
|
|
|
application/rss+xml
|
|
|
|
|
application/atom+xml
|
|
|
|
|
image/svg+xml
|
|
|
|
|
font/woff
|
|
|
|
|
font/woff2;
|
|
|
|
|
|
2026-04-14 10:27:51 +02:00
|
|
|
location / {
|
|
|
|
|
try_files $uri $uri/ $uri.html =404;
|
|
|
|
|
}
|
|
|
|
|
|
2026-08-26 12:57:23 +02:00
|
|
|
# Poll counter (ops/poll/pollsvc.py) — cookie-free, rate-limited.
|
|
|
|
|
location /api/poll/ {
|
2026-08-26 13:21:19 +02:00
|
|
|
# Public traffic arrives from the edge proxy via 192.168.178.164.
|
|
|
|
|
# Only that hop is trusted when unwinding X-Forwarded-For, so a
|
|
|
|
|
# client-supplied X-Forwarded-For cannot forge a fresh "device".
|
|
|
|
|
set_real_ip_from 192.168.178.164;
|
|
|
|
|
real_ip_header X-Forwarded-For;
|
|
|
|
|
real_ip_recursive on;
|
|
|
|
|
|
2026-08-26 12:57:23 +02:00
|
|
|
limit_req zone=poll burst=10 nodelay;
|
|
|
|
|
proxy_pass http://127.0.0.1:8090/;
|
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
|
proxy_set_header User-Agent $http_user_agent;
|
|
|
|
|
proxy_read_timeout 5s;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-14 10:27:51 +02:00
|
|
|
location = /favicon.svg {
|
|
|
|
|
access_log off;
|
|
|
|
|
log_not_found off;
|
|
|
|
|
expires 7d;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
location ~* \.(css|js|svg|woff2?|png|jpg|jpeg|webp|avif)$ {
|
|
|
|
|
access_log off;
|
|
|
|
|
expires 30d;
|
|
|
|
|
add_header Cache-Control "public, immutable";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
error_page 404 /404.html;
|
|
|
|
|
}
|