“不安全地将不安全来源作为安全地处理".标记在Chrome上不起作用 [英] "unsafely-treat-insecure-origin-as-secure" flag is not working on Chrome
本文介绍了“不安全地将不安全来源作为安全地处理".标记在Chrome上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Chrome上的HTTP在我的计算机上本地运行的网站上使用地理位置.但是,这不起作用,因为我在HTTP(而不是HTTPS)上运行.
I am using geo-location for a site running locally on my machine using HTTP on Chrome. However this does not work as I am running on HTTP as opposed to HTTPS.
在控制台上显示:
getCurrentPosition() and watchPosition() no longer work on insecure origins.
To use this feature, you should consider switching your application to a
secure origin, such as HTTPS. See https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-powerful-features-on-insecure-origins
for more details.
Accoriding to Deprecating Powerful Features on Insecure Origins its says to start chrome using --unsafely-treat-insecure-origin-as-secure="http://example.com"
flag. The command I ran was similar to:
chrome.exe --unsafely-treat-insecure-origin-as-secure="http://hello.app"
但是,仍然出现相同的错误消息.
However, the same error message still appears.
如何解决此问题.
推荐答案
没有一个解决方案对我有用.
None of the solutions worked for me.
我通过以下步骤实现了这一目标.
I achieved this by following steps.
-
在地址栏中
- 键入 chrome://flags/#unsafely-treat-insecure-origin-as-secure .
- 如下图所示,添加您需要视为安全的原点.
- Type chrome://flags/#unsafely-treat-insecure-origin-as-secure in the address bar.
- Add the origin which you need to treat as secure as shown in the below image.
- 重新启动Chrome.
这篇关于“不安全地将不安全来源作为安全地处理".标记在Chrome上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文