【问题标题】:google-chrome --unsafely-treat-insecure-origin-as-secure command line flag not workinggoogle-chrome --unsafely-treat-insecure-origin-as-secure 命令行标志不起作用
【发布时间】:2018-02-07 07:22:08
【问题描述】:

我知道这是一个现有的问题,但没有明确的答案。

Google chrome --unsafely-treat-insecure-origin-as-secure,无法通过 http 访问麦克风。它仍然显示无法通过 http 访问 getuserMedia()。

它在打开 chrome 时显示以下警告横幅。

"you are using a unsupported command line flag --unsafely-treat-insecure-origin-as-secure="http://example.com". Stability and Security will suffer.

我在终端中运行的确切命令

google-chrome --unsafely-treat-insecure-origin-as-secure="http://example.com" --user-data-dir="/home/users/myname/chrome-temp-data"

OS Version Ubuntu: 16.04 LTS(64 bit) Google Chrome Version: Version 63.0.3239.132 (Latest version) (64-bit)

如果这是正确的命令行标志,为什么我会得到“不支持的命令行”横幅?有什么我做错了,任何想法将不胜感激。

谢谢。

【问题讨论】:

  • 横幅只是警告chrome在这种模式下的安全性较低。一些标志会这样做。 stackoverflow.com/questions/14215382/…
  • 您是在 example.com 还是 subdomain.example.com 上?
  • @JoshLee 不在子域中。我还没有弄清楚。顺便说一句,横幅可能是一个警告,但它表示不支持的标志
  • 在新标签中打开,chrome://flags/ 然后全部重置为默认值。

标签: google-chrome


【解决方案1】:

根据第 3 点 here 中的注释,该标志在 Chrome 63 中被破坏,但在 64 中再次修复。

此外,您不再需要 --user-data-dir 标志来使其工作。

【讨论】:

  • 另请注意,如果您需要在 URL 栏中指定一个,您指定的域必须包含端口。
  • 在 Chrome 67 (OS X) 上:不工作,导致 You are using an unsupported command-line flag: --unsafely-treat-insecure-origin-as-secure… 错误。
  • 我在 Linux Chrome 73.0.3683.103 上,它也不适合我。我收到“您正在使用不受支持的命令行标志..”错误,并且提供的主机仍被假定为不安全。
  • @ÍhorMé 去掉引号。 不好: --unsafely-treat-insecure-origin-as-secure="http://example.com"工作: --unsafely-treat-insecure-origin-as-secure=http://example.com
  • 谢谢,下次试试
猜你喜欢
  • 2017-04-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-01-24
  • 1970-01-01
  • 2021-12-15
  • 2018-11-23
相关资源
最近更新 更多