解决Mixed Content: The page at。。。。HTTPS中包含http的不安全问题

在将写好的静态页面使用github部署显示时,因为gitHub是https的,而在静态网页中有引用http的包,报错如下:

主要就是https中包含http,就不安全了,

解决方式:

1,在header中:

<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

2,一般引用的cs包或js包都是可以直接改写成https的 。所以可以把http都改写成https

这样就可以了

发布了58 篇原创文章 · 获赞 41 · 访问量 12万+

猜你喜欢

转载自blog.csdn.net/Zeng__Yi/article/details/103312161
今日推荐