gpt4 book ai didi

google-chrome - 使用不支持的命令行标志时如何抑制 Chrome 中的警告?

转载 作者:行者123 更新时间:2023-12-04 15:31:38 31 4
gpt4 key购买 nike

我正在开发一个本地应用程序,该应用程序主要使用本地文件系统中的文件并从整个站点获取资源,从而完成一些“坏事”。这导致违反 same origin policy在 Chrome 中。我很清楚这样做的安全问题,但需要这样做。

查看 this answerthis answer和互联网上的其他几个人一样,许多人建议使用各种命令行标志启动 Chrome,主要是 --disable-web-security

问题在于,Chrome 会在启动时发出警告:

You are using an unsupported command-line flag: --disable-web-security. Stability and security will suffer

地址栏正下方。

这是一个安装,所以我显然不能每次启动应用程序时都会弹出这个。有办法抑制这种情况吗?

This thread看起来这似乎是不可能的,但是伙计,那会很烦人。

最佳答案

我通过使用这个 Chrome 扩展程序解决了这个问题:Allow-Controll-Allow Origin: * .

enter image description here

注意:有时您会发现扩展程序不起作用;只需禁用并启用“启用跨源资源共享”,它就会再次工作。

关于google-chrome - 使用不支持的命令行标志时如何抑制 Chrome 中的警告?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38751594/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com