Merge #184: fix: fetch the manifest with cookies, and tell self-hosters behind an auth proxy what to exempt (iOS Home Screen icon) (kurktchiev)

This commit is contained in:
Duarte Santos committed 2026-09-17 11:29:35 +02:00
commit 5eeec2a52a
2 files changed
+14 -1

No files matched your search

+10
View File
@@ -159,6 +159,16 @@ same device.
Prefer to keep the whole thing off the open internet? A VPN or an auth proxy (Authelia, Cloudflare
Access…) in front still works, and composes with the above.
Behind an auth proxy, let three files through without a login: `/icon-180.png`, `/icon-512.png`
and `/manifest.json` — the app's icon and its manifest, nothing personal in them. iOS fetches the
Home Screen icon outside the page, without your session cookie, so a gated icon comes back as the
proxy's login page and iOS 26 draws a letter tile instead of the dumbbell (observed on iOS 26.6
behind Teleport; Authelia users know the same from favicons and manifests). Authelia: a `bypass`
rule for those paths; Authentik: unauthenticated paths; Cloudflare Access: a bypass policy;
oauth2-proxy: `skip_auth_routes`. A proxy that cannot exempt a path (Teleport) has to serve the
icons inline as `data:` URLs instead — Safari 26 accepts those, older iOS does not, which is why
that is not the default here.
## 5. Fitting it into an existing stack
The defaults assume openGym is the only thing here: a service called `api` on port 3000, and nginx
+4 -1
View File
@@ -10,7 +10,10 @@
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="openGym">
<link rel="manifest" href="manifest.json">
<!-- use-credentials: browsers fetch the manifest without cookies, even same-origin; behind an auth
proxy (Authelia, Cloudflare Access, Teleport…) that fetch is a login redirect and the Home Screen
icon comes out generic. iOS 26 reads the icon from the manifest, so this is where it shows. -->
<link rel="manifest" href="manifest.json" crossorigin="use-credentials">
<link rel="apple-touch-icon" href="icon-180.png">
<link rel="icon" type="image/png" href="icon-180.png">
</head>