在渐进式 Web 应用程序的地址栏中显示的 url [英] url showing in address bar in progressive web apps

查看:55
本文介绍了在渐进式 Web 应用程序的地址栏中显示的 url的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在开发渐进式网络应用程序,在Android手机中,我们在地址中看到如下所示的url,在此处输入图片描述

We are developing progressive web app, in android phone, we are seeing url in address s shown in below, enter image description here

我们在 Manifest.json 中采取的步骤,

Steps we have taken care in Manifest.json,

"display": "standalone",
"orientation": "portrait",
"Scope": "/",
"start_url": "/Home/Test",

起始页总是http://localhost:52432/Home/test,独立显示完美,但是当我们点击其他标签时,它开始在地址栏中显示带锁的url符号.

Starting page always which is http://localhost:52432/Home/test, displaying perfectly in stand alone, but when we click other tabs then it started displaying url in the address bar with lock symbol.

任何机构可以帮助我吗,感谢您的所有努力.

Can any body help me on this, appreciate all your efforts.

谢谢,卡西克·内雷拉

推荐答案

PWA 中的 URL 是 google chrome 采取的一种安全措施,旨在避免用户在没有适当通知的情况下导航到恶意站点.假设黑客创建了一个虚假的支付网关并以独立模式将您重定向到那里.你怎么知道它是否合法?你说 "http://localhost:52432/Home/test" 不会显示 URL,可能是因为它是 manifest.json 中的 start_url.尝试将所有页面移至主页.例如,如果您有localhost:52432/Profile/page",请将其移动到localhost:52432/Home/page".这可能对您有所帮助.

URL in PWA is a security measure taken by google chrome to avoid the users navigating to a malicious site without proper notice. Say a hacker creates a fake payment gateway and redirects you there in standalone mode. How would you know whether it is legit or not? You say that "http://localhost:52432/Home/test" won't show the URL, might be because it's your start_url in manifest.json. Try moving all the pages to Home. For Example, if you have "localhost:52432/Profile/page", move it to "localhost:52432/Home/page". This might help you.

这篇关于在渐进式 Web 应用程序的地址栏中显示的 url的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆