url showing in address bar in progressive web apps

时间秒杀一切 提交于 2019-12-11 03:35:33

问题


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

Steps we have taken care in Manifest.json,

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

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.

Thanks, Karthik Nerella


回答1:


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.



来源:https://stackoverflow.com/questions/46352302/url-showing-in-address-bar-in-progressive-web-apps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!