feat(proxy): preserve original Host header by default #1
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/preserve-host-header"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
proxy_httpto forward the original clientHostheader to the backend by default, instead of letting reqwest substitute the backend hostnamerewrite_hostboolean per-service escape hatch (defaultfalse) for any backend that needs the old behaviour006_service_rewrite_host.sqlMotivation
AWS Signature V4 includes
Hostin the signed headers. When a client signs a request withHost: s3.oates.wsand the proxy forwards it withHost: minio:9000, MinIO rejects it withSignatureDoesNotMatch. The same issue affects cookie domain matching and redirect URL generation.The existing WebSocket path (
proxy_websocket) already preserves the original Host — this brings HTTP into line with the same behaviour, and with nginx's recommendedproxy_set_header Host $hostpractice.Usage
Default (no change needed for most services):
Opt out (rewrite to backend hostname):