Skip to content

Commit 4eb970c

Browse files
committed
fix(app): use credentials when fetching webmanifest
Web manifests are fetched in a no-CORS mode that does not include the page's basic-auth credentials by default. With OPENCODE_SERVER_PASSWORD set, an authenticated user still sees `Manifest fetch ... failed, code 401` errors on every reload, and the browser issues a separate auth dialog for the manifest before settling. Adding `crossorigin="use-credentials"` makes the browser send the page's credentials with the manifest request, so the manifest fetch succeeds in the same auth context as the page. When OPENCODE_SERVER_PASSWORD is unset (no auth), this attribute has no effect on the request - the manifest is served unauthenticated as before. Refs upstream issue anomalyco#18325
1 parent 21604ac commit 4eb970c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎packages/app/index.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<link rel="icon" type="image/svg+xml" href="/favicon-v3.svg" />
99
<link rel="shortcut icon" href="/favicon-v3.ico" />
1010
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-v3.png" />
11-
<link rel="manifest" href="/site.webmanifest" />
11+
<link rel="manifest" href="/site.webmanifest" crossorigin="use-credentials" />
1212
<meta name="theme-color" content="#F8F7F7" />
1313
<meta name="theme-color" content="#131010" media="(prefers-color-scheme: dark)" />
1414
<meta name="apple-mobile-web-app-capable" content="yes" />

0 commit comments

Comments
 (0)