是否可以从经过身份验证的站点加载渐进式 Web 应用程序清单文件?

Ser*_*ver 2 basic-authentication progressive-web-apps

我在 SharePoint 文档库中有渐进式 Web 应用程序 index.html 页面和资产。我需要在访问 index.html 页面时进行身份验证。但是<link rel="manifest" href="manifest.json.txt">当从 index.html 页面请求时,作为链接的 manifest.json 文件没有所需的身份验证 cookie。请注意,SharePoint 不提供 .jon 文件,这就是它以 .txt 结尾的原因。有没有办法从经过身份验证的站点检索清单?

当我将清单放在可匿名访问的位置时,即在 SharePoint 之外(我现在使用我的保管箱),它就可以工作。在这种情况下,我需要为 start_url 指定完整路径。但这不是一个非常好的部署模型,因为我需要将文件部署到两个不同的位置......

Ser*_*ver 7

是的,可以在经过身份验证的站点上使用清单链接,但要确保在清单使用请求中传递该凭据:

<link rel="manifest" href="manifest.json.txt" crossorigin="use-credentials">

https://github.com/w3c/manifest/issues/535https://github.com/dominickng给出的答案。