# /etc/nginx/snippets/borgstore-proxy.conf # # Common proxy settings for borgstore location blocks. # Timeouts for slow filesystem operations (create, destroy, etc.) proxy_read_timeout 300s; proxy_connect_timeout 60s; proxy_send_timeout 300s; # Disable retries to ensure idempotent-but-slow operations are handled correctly by the client. proxy_next_upstream off; 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; # Essential: borgstore streams data; buffering causes timeouts on large chunks. proxy_buffering off; proxy_request_buffering off; # Allow persistent connections, borgstore uses chunked transfers. proxy_http_version 1.1; # Pass all headers from the client to borgstore proxy_pass_request_headers on; # Disable any potential caching proxy_cache off;