【问题标题】:Site cannot be installed: the page is not served from a secure origin无法安装站点:该页面不是从安全来源提供的
【发布时间】:2017-08-27 18:49:44
【问题描述】:
我已将 manifest.json 创建到一个站点,以便将 Web 应用程序图标保存在桌面上。
我的开发者网站通过 http - 当我从应用程序选项卡单击添加到主屏幕时它不起作用。
我收到控制台错误:
Site cannot be installed: the page is not served from a secure origin
同样的代码可以在 https 上运行。
我怎样才能简单地绕过http中的这个问题
注意:我在 chrome 浏览器中执行了以下步骤,它没有解决我的问题。
Stackoverflow previously Question
任何帮助将不胜感激。
【问题讨论】:
标签:
google-chrome
http
web
https
bookmarks
【解决方案1】:
chrome://flags/#unsafely-treat-insecure-origin-as-secure
启用并添加站点来源
【解决方案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 可执行文件存在于上述位置。
这也只是为了在本地环境中测试。