且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从 HTTPS 页面到 HTTP(非 HTTPS)本地主机地址的混合内容请求未被阻止

更新时间:2021-08-23 21:12:05

http://127.0.100.2/img.jpg 不被视为混合内容,因为混合内容规范将其定义为先验认证 URL,因为它在 127.0.0.0 - 127.255.255.255 范围内(即具有 CIDR 表示法 127.0.0.0/8 的主机),根据安全上下文规范被定义为安全上下文——即使协议不是 https.

http://127.0.100.2/img.jpg isn’t considered mixed content because the Mixed Content spec defines it as a special case of an a priori authenticated URL, due to it being in the range 127.0.0.0 - 127.255.255.255 (that is, a host with the CIDR notation 127.0.0.0/8), which per the Secure Contexts spec is defined as a secure context — even if the protocol isn’t https.

http://localhost/img.jpghttp://foo.localhost/img.jpg