google浏览器访问https网站,http协议的图片无法访问,nginx如何调整才能解决
·
在访问HTTPS网站时,如果页面中包含HTTP协议的图片,可能会导致访问失败。此时,您可以在NGINX服务器上调整配置,以支持跨协议请求。
首先,您需要安装NGINX的HTTP代理模块,并启用它:
http {
server {
location / {
proxy_pass http://upstream;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
}
更多推荐
所有评论(0)