无法安装站点:页面不是从安全来源提供的

use*_*008 3 https bookmarks google-chrome http web

我已将 manifest.json 创建到一个站点,以便能够将 Web 应用程序图标保存在桌面上。

我的开发者网站通过 http - 当我从应用程序选项卡单击添加到主屏幕时,这不起作用。

我收到控制台错误:

Site cannot be installed: the page is not served from a secure origin
Run Code Online (Sandbox Code Playgroud)

相同的代码适用于 https。

如何在 http 中简单地绕过这个问题

注意:我在 chrome 浏览器中遵循了以下步骤,它没有解决我的问题。

Stackoverflow 以前的问题

任何帮助将不胜感激。

小智 7

chrome://flags/#unsafely-treat-insecure-origin-as-secure 启用并添加站点来源


use*_*008 2

问题是服务人员只会在安全源上注册和安装。因此遵循以下步骤:

  1. 进入程序文件中的chrome.exe路径,在桌面上创建chrome的快捷方式

  2. 右键单击快捷方式 - 转到属性 - 使用以下更改更新目标 "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --unsafely-treat-insecure-origin-as-secure=http://wzy.xyz.com,http://x.xyz.com --user-data-dir=/anydirectory/

注意:确保您的 google chrome 可执行文件存在于上述位置。

另外这只是在本地环境中测试。