【问题标题】:UWP PWA: Subdomain as start pageUWP PWA:子域作为起始页
【发布时间】:2023-03-06 02:34:01
【问题描述】:

我正在尝试将我的 PWA 发布为 UWP 应用,但子域有问题,它托管在上面。

例如当我将 https://example.com/ 设置为 StartPage 时,它​​可以正常工作,但是当使用 https://sub.example.com/ 时,它一直显示启动屏幕(应用程序徽标)。

两个域包含几乎相同的源代码,并且在 MS Edge 中都可以工作。

Package.appxmanifest:

<Application Id="App" StartPage="https://sub.example.com/">

如何解决这个问题?

【问题讨论】:

    标签: visual-studio uwp progressive-web-apps


    【解决方案1】:

    确保在 Package.appxmanifest 编辑器的 Content URIs 选项卡中包含子域 URL:

    或者,将其包含在 uap:ApplicationCntentUriRules 元素的 XML 代码中:

    <uap:ApplicationContentUriRules>
      <uap:Rule Match="https://blog.mzikmund.com" Type="include" 
                WindowsRuntimeAccess="all" />
      <uap:Rule Match="https://*.*" Type="include" WindowsRuntimeAccess="none" />
      <uap:Rule Match="http://*.*" Type="include" WindowsRuntimeAccess="none" />
    </uap:ApplicationContentUriRules>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-01-01
      • 2021-08-14
      • 2019-07-29
      • 1970-01-01
      • 2014-03-16
      • 1970-01-01
      • 1970-01-01
      • 2020-06-22
      相关资源
      最近更新 更多