如果nxinx在负载均衡器后面运行,是否可以强制nginx $ scheme值为"https"?
在我的场景中,负载均衡器负责与客户端的https通信,并将请求作为原始http转发给nginx.我知道我可以做这样的事情来检测https
set $my_scheme "http";
if ($http_x_forwarded_proto = "https") {
set $my_scheme "https";
}
Run Code Online (Sandbox Code Playgroud)
但我只是好奇是否有类似real_ip_headerIP的功能.
在检测https时,是否还需要更新一些标题?