【问题标题】:url showing in address bar in progressive web apps渐进式 Web 应用程序的地址栏中显示的 url
【发布时间】:2023-03-29 05:03:01
【问题描述】:

我们正在开发渐进式网络应用程序,在 android 手机中,我们在地址中看到 url,如下所示, enter image description here

我们在 Manifest.json 中处理的步骤,

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

起始页始终为http://localhost:52432/Home/test,独立显示完美,但是当我们单击其他选项卡时,它开始在地址栏中显示带有锁定符号的url。

任何人都可以帮助我,感谢您的所有努力。

谢谢, 卡提克·内雷拉

【问题讨论】:

  • 有没有人找到解决这种情况的方法?

标签: progressive-web-apps progressive


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2019-01-18
    • 1970-01-01
    • 1970-01-01
    • 2020-03-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-07-28
    • 1970-01-01
    相关资源
    最近更新 更多