使用的 Supermium 浏览器,一个 Chromium 内核定制的开源浏览器,最近发现一直没法过任何 Cloudflare 系列的人机验证,比如 OpenAI ......,Cloudflare 官网登录控制台 https://dash.cloudflare.com/login
的 Let us know you're human,点击确认你是真人后无限循环
经测试与 Cookies、浏览器扩展无关,使用新建的用户配置测试,给浏览器快捷方式附加新用户配置的参数 --user-data-dir=Test
,启动浏览器再次访问测试,发现能正常访问并完成受 cf 保护的人机验证网站
输入 chrome://version
,发现命令行参数只有有限的 1-2个,没有我之前用了很久的那个上百项参数设置
应该是什么特殊 Flags 导致的问题,经过一个个测试,最终锁定为 enable-controlled-frame 这个选项
Chromium 内核的浏览器访问 chrome://flags/#enable-controlled-frame
,检查此项是不是开了,将其改为 Disable 或 Default
选项说明:
Enable Controlled Frame
Enables experimental support for Controlled Frame. See https://github.com/WICG/controlled-frame/blob/main/EXPLAINER.md for more information. – Mac, Windows, Linux, ChromeOS, Lacros
翻译一下就是:
Controlled Frame API 允许开发者在 隔离的 Web 应用(Isolated Web Applications,
IWAs) 中嵌入第三方内容(如网页、视频等),即使这些内容原本禁止通过 <iframe> 嵌入(例如设置了
X-Frame-Options 或 CSP 策略)。 该功能通过 <controlledframe> 元素实现,核心目标是扩展
<iframe> 的使用场景,同时通过隔离环境保障安全性
重启浏览器实时生效,最后恢复正常
参考资料
https://github.com/win32ss/supermium/issues/1414
https://github.com/WICG/controlled-frame/blob/main/EXPLAINER.md