BUG/feat: own favicon (💌) — currently shows Shlink's #17
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
The app has no own favicon, so the browser's request for
/favicon.ico(not one of the app's claimed paths:/ /compose /c/ /static/ /health) falls through to the Shlink catch-all → the tab shows Shlink's favicon. m wants the app's own — suggests the love-letter emoji 💌 (already the brand mark, '💌 Grußkarte').Fix (two parts)
App (worker):
web/static/favicon.svg(<svg ...><text>💌</text></svg>), embedded via the existingweb/embed.gostatic FS. Optionally a PNGapple-touch-iconfor iOS home-screen.<link rel="icon" href="/static/favicon.svg" type="image/svg+xml">(+ apple-touch-icon link) to all page templates (landing, compose, postcard, notfound, passwordprompt) —/static/is already app-claimed, so this serves correctly./favicon.ico(serve the svg/ico) so a direct/favicon.icohit is answered by the app, not Shlink. (Browsers request/favicon.icodirectly regardless of the link tag.)Routing (otto-head, on deploy):
Path(\/favicon.ico`)(and/favicon.svg,/apple-touch-icon.pngif added) to the Traefik **app router** path list inpostcards-app.yml/postcards-shlink.yml` for both post.msbls.de and sendmy.cards, so favicon requests stop falling through to Shlink. otto-head handles this Traefik change at deploy.Constraints
DoD
/favicon.icoanswered by the app (not Shlink).Done ✅ — own 💌 favicon
The app now serves its own love-letter favicon instead of falling through to Shlink's.
web/static/favicon.svg— a warm envelope-with-heart in the app's accent palette (renders cleanly down to 16px).<link rel="icon" href="/static/favicon.svg" type="image/svg+xml">in all page templates: landing, compose, postcard, notfound, passwordprompt, expired, admin, admin_login, admin_confirm.GET /favicon.icoroute (handleFavicon) serves the embedded SVG withContent-Type: image/svg+xml+ a 1-day cache header, so the legacy path no longer falls through to Shlink. Registered unconditionally (independent of the admin feature).TestFaviconServedByApp(200 +image/svg+xml+ SVG body).Matches your note: Traefik already routes
/favicon.icoto the app on both domains, so no Traefik change needed — the app now answers it.build / vet / test green.
Commit:
3ae968445b✅ Live — merged
3ae9684(merge9a8eda4), deployed. Own 💌 favicon: /favicon.ico + /static/favicon.svg now served by the app (200 image/svg+xml, no longer Shlink's), link tags in all templates. Traefik /favicon.ico already routed to the app. Not closing — m closes.