Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能否增加 UpgradeMixedContent 功能 #15

Closed
ivysrono opened this issue Feb 15, 2017 · 3 comments
Closed

能否增加 UpgradeMixedContent 功能 #15

ivysrono opened this issue Feb 15, 2017 · 3 comments
Assignees

Comments

@ivysrono
Copy link

功能来自:UpgradeMixedContent 扩展
简述:
main_frame 为 https 但页内有 http 资源时,浏览器会默认禁止主动性资源如 JS,目前还会放行被动型资源如 image,这一行为由浏览器完成,扩展基本不能干预。
昨天发现的 UpgradeMixedContent 扩展提供了目前仅见的干预思路:给所有的 http 资源插入一个 upgrade-insecure-requests ,这样浏览器就会尝试用 https 来访问本会被 MCB 的资源。
缺陷:
UpgradeMixedContent 扩展是默认全局使用的,于是部分资源,主要是图片就会被破坏,如 好奇心日报
该扩展作者是个极端派,他认为没有加密的资源就不应该被载入。

建议:
本扩展重定向包含所有资源类型,能否加入该功能,这样我就能把部分页面默认重定向到 https 了,如 https://i.gtimg.cn/

HTTPS-Everywhere 也开始讨论这个问题了:EFForg/https-everywhere#8506

@ivysrono
Copy link
Author

https://github.com/gloomy-ghost/UpgradeMixedContent
Chrome版有了黑名单。
但直接打包成Firefox扩展的话没有设置页面。
另外没有白名单模式,误伤在所难免。

@fengyc
Copy link
Owner

fengyc commented Feb 20, 2017

从这个文档 https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Headers/Upgrade-Insecure-Requests 来看,需要在请求头部加上一个 Upgrade-Insecure-Requests ,应该可以实现的

@KrasnayaPloshchad
Copy link
Contributor

现在暂时可以使用 UpgradeMixedContentByBlacklist 来代替

@ivysrono ivysrono closed this as completed Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants