# Paste inside your server { ... } block, or include with: include /path/to/this/file;
# Upstream: Flask on the Pi (e.g. 192.168.1.101:8765).
# On the Pi, set in .env: URL_PREFIX=/timedtasks
# (Forms use this path; X-Forwarded-Prefix is optional and not required if URL_PREFIX is set.)

location /timedtasks/ {
    proxy_pass http://192.168.1.101:8765/;
    proxy_http_version 1.1;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-Host $host;
}
