Https下http资源不能访问解决方案

问题如下:nginx安装了https证书 修改为https访问后,但应用内有些http的,导致一些样式或者页面访问报错,因为https下面默认访问http是会报错的。

解决方案:我们修改下nginx的转发策略,只需在代理转发添加如下配置即可:

add_header Content-Security-Policy upgrade-insecure-requests;

猜你喜欢

转载自blog.csdn.net/xingsfdz/article/details/120201471