如何在 nginx 中设置 X-Forwarded-Proto 头
直接在任何 proxy_pass 行之后添加
proxy_set_x_forwarded_proto.conf
proxy_set_header X-Forwarded-Proto $scheme;通常 X-Forwarded-Proto 与 X-Forwarded-Host 一起使用,如下所示:
proxy_set_x_forwarded_host_and_proto.conf
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;Check out similar posts by category:
Networking, Nginx, Wordpress
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow