Enable cross-origin manifest to make PWA work behind Cloudflare Access (#734)

* feat: add crossOrigin use-credentials to PWA manifest link for Cloudflare Access compatibility

* docs: add inline comment explaining crossOrigin use-credentials on manifest link

Co-authored-by: arthurfiorette <47537704+arthurfiorette@users.noreply.github.com>
This commit is contained in:
Arthur Fiorette
2026-03-23 11:37:07 +02:00
committed by GitHub
parent b3905e7e93
commit 1a41ca3c7d
+3
View File
@@ -198,6 +198,9 @@
const manifestLink = document.createElement('link');
manifestLink.rel = 'manifest';
// Required so the browser sends auth cookies when fetching the manifest,
// enabling PWA installation behind authentication proxies (e.g. Cloudflare Access).
manifestLink.crossOrigin = 'use-credentials';
document.head.appendChild(manifestLink);
let activeManifestBlobUrl = null;