代理应该在主机 header 中传递什么?

What should a proxy pass in the Host header?

今天我发现 $host$http_host 不同。至少 $host 不包含端口号。虽然有 more to it. My understanding is that people usually do proxy_set_header Host $host,但这是...错误的?有某种通用准则吗?

nginx-proxy has proxy_set_header Host $http_host 在其配置中。对我来说听起来像是权威来源。