# Common proxy parameters for all upstream services

# Pass original request information
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;
proxy_set_header X-Forwarded-Port $server_port;

# Timeouts
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;

# Buffering
proxy_buffering on;
proxy_buffer_size 4k;
proxy_buffers 8 4k;
proxy_busy_buffers_size 8k;

# HTTP version
proxy_http_version 1.1;

# Connection management
proxy_set_header Connection "";

# Disable redirects
proxy_redirect off;

# Hide upstream headers
proxy_hide_header X-Powered-By;
proxy_hide_header Server;
