| 1 |
# /etc/nginx/snippets/borgstore-proxy.conf |
| 2 |
# |
| 3 |
# Common proxy settings for borgstore location blocks. |
| 4 |
|
| 5 |
# Timeouts for slow filesystem operations (create, destroy, etc.) |
| 6 |
proxy_read_timeout 300s; |
| 7 |
proxy_connect_timeout 60s; |
| 8 |
proxy_send_timeout 300s; |
| 9 |
|
| 10 |
# Disable retries to ensure idempotent-but-slow operations are handled correctly by the client. |
| 11 |
proxy_next_upstream off; |
| 12 |
|
| 13 |
proxy_set_header Host $host; |
| 14 |
proxy_set_header X-Real-IP $remote_addr; |
| 15 |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 16 |
proxy_set_header X-Forwarded-Proto $scheme; |
| 17 |
|
| 18 |
# Essential: borgstore streams data; buffering causes timeouts on large chunks. |
| 19 |
proxy_buffering off; |
| 20 |
proxy_request_buffering off; |
| 21 |
|
| 22 |
# Allow persistent connections, borgstore uses chunked transfers. |
| 23 |
proxy_http_version 1.1; |
| 24 |
# Pass all headers from the client to borgstore |
| 25 |
proxy_pass_request_headers on; |
| 26 |
|
| 27 |
# Disable any potential caching |
| 28 |
proxy_cache off; |