desktop: embed GitDXD too (Forgejo needs [cors] X_FRAME_OPTIONS = unset)

This commit is contained in:
Martin Dvořák 2026-09-25 11:07:25 +00:00
commit 02c516af74
3 changed files with 25 additions and 20 deletions

View file

@ -41,19 +41,21 @@ interface IconEntry {
// `embed: true` renders the real site in an iframe, which the browser refuses
// (blank window) when the server sends X-Frame-Options / frame-ancestors.
// Llama.cpp and Jellyfin allow framing out of the box. Navidrome sends
// `X-Frame-Options: DENY` unless it is started with
// `ND_HTTPHEADERS_FRAMEOPTIONS=ALLOWALL`, which replaces that header with an
// unrecognised value the browser ignores (that env var is set on the Navidrome
// host — without it this window is blank again). Forgejo (GitDXD) sends
// `SAMEORIGIN`, so it keeps its dedicated app card.
// Llama.cpp and Jellyfin allow framing out of the box; Navidrome and Forgejo
// need to be told to stop sending a restrictive value:
// - Navidrome: `ND_HTTPHEADERS_FRAMEOPTIONS=ALLOWALL`
// - Forgejo: `[cors] X_FRAME_OPTIONS = unset` (Forgejo reads this from
// [cors], NOT [security]) then restart Forgejo.
// Any X-Frame-Options value a browser doesn't recognise is ignored, so the
// frame is allowed. These live on the service hosts — without them the windows
// go blank again.
const SERVICE_SHORTCUTS: Shortcut[] = [
{ id: "svc-proxmox", icon: "🖥️", label: "Proxmox", appId: "alacritty", color: "#1257a0", desc: "Server Management" },
{ id: "svc-ai", icon: "🦾", label: "Llama.cpp", url: "https://ai.dvorakmortonxd.dev/", color: "#157347", desc: "Local AI Server", embed: true },
{ id: "svc-jellyfin", icon: "🎬", label: "Jellyfin", url: "https://jelly.dvorakmortonxd.dev/", color: "#6a4fb3", desc: "Local Media Server", embed: true },
{ id: "svc-smp", icon: "🎮", label: "SMP", appId: "smp", color: "#c0392b", desc: "My Survival Minecraft Server" },
{ id: "svc-navidrome", icon: "🎸", label: "Navidrome", url: "https://navidrome.dvorakmortonxd.dev/", color: "#b3005f", desc: "Music Streaming", embed: true },
{ id: "svc-gitdxd", icon: "🐙", label: "GitDXD", appId: "gitdxd", color: "#6a4fb3", desc: "Best Git Hosting OAT" },
{ id: "svc-gitdxd", icon: "🐙", label: "GitDXD", url: "https://git.dvorakmortonxd.dev", color: "#6a4fb3", desc: "Best Git Hosting OAT", embed: true },
];
const FRIEND_SHORTCUTS: Shortcut[] = friends.map((f, i) => ({