feat(web): make footer legal links configurable

Add a "main.footer-links" config option so the footer Imprint and
Privacy Policy links can point at internal pages (default) or external
URLs. External http(s) targets open in a new tab; empty/unset values
fall back to the built-in /imprint and /privacy routes, keeping the
existing ./var/*.tmpl override mechanism intact.

Closes #517

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: c5dca72c848f
This commit is contained in:
2026-06-17 17:29:50 +02:00
parent 9d1efcd55d
commit 411bc9b317
6 changed files with 75 additions and 2 deletions

View File

@@ -80,6 +80,18 @@ type ProgramConfig struct {
// Database tuning configuration
DbConfig *DbConfig `json:"db-config"`
// Optional external/legal links shown in the footer.
FooterLinks FooterLinksConfig `json:"footer-links"`
}
// FooterLinksConfig configures the legal/footer links rendered in the UI.
// Each value may be an internal path (e.g. "/imprint") or an external URL.
type FooterLinksConfig struct {
// Target URL/path for the "Imprint" footer entry.
Imprint string `json:"imprint"`
// Target URL/path for the "Privacy Policy" footer entry.
Privacy string `json:"privacy"`
}
type DbConfig struct {
@@ -145,6 +157,10 @@ var Keys ProgramConfig = ProgramConfig{
SessionMaxAge: "168h",
StopJobsExceedingWalltime: 0,
ShortRunningJobsDuration: 5 * 60,
FooterLinks: FooterLinksConfig{
Imprint: "/imprint",
Privacy: "/privacy",
},
}
func Init(mainConfig json.RawMessage) {