Skip to content

Make login page background image configurable via LOGIN_IMAGE#443

Merged
jzakotnik merged 2 commits into
jzakotnik:mainfrom
gunwald:make-login-image-configurable
Jul 5, 2026
Merged

Make login page background image configurable via LOGIN_IMAGE#443
jzakotnik merged 2 commits into
jzakotnik:mainfrom
gunwald:make-login-image-configurable

Conversation

@gunwald

@gunwald gunwald commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Closes #418

The login page hardcoded the bundled splash image. This wires the already-documented LOGIN_IMAGE env var so each deployment can set its own login background.

What changed

  • getServerSideProps reads LOGIN_IMAGE (a filename in /public) and the login page uses it, falling back to the bundled splash when unset.
  • A shared helper (lib/loginImage.ts) resolves the path for both the login page and proxy.ts, so the auth allowlist matches the URL the page requests — otherwise the /public image is gated and 307-redirected to login, leaving the background blank.
  • Documented in .env_example.

Notes

  • Same-origin only by design (the CSP is img-src 'self').
  • The deployment's actual image is provided per install, not committed to the repo.

🤖 Generated with Claude Code

The login page hardcoded the bundled splash. Read LOGIN_IMAGE (a filename in
/public) in getServerSideProps and use it, falling back to the bundled splash
when unset. Same-origin only by design (the CSP is img-src 'self').

A shared helper (lib/loginImage.ts) resolves the path for both the login page
and proxy.ts, so the auth allowlist always matches the URL the page requests —
without it the /public image is gated and 307-redirected to login, leaving the
splash blank. Documented in .env_example.
@gunwald gunwald force-pushed the make-login-image-configurable branch from 354ac57 to 189b3fd Compare July 5, 2026 06:34
@jzakotnik

Copy link
Copy Markdown
Owner

2 items open

  • update the settings overview and .env generator on pages/admin/settings.tsx
  • update docs on doc/mkdocs/docs/configuration/environment-variables.md

@gunwald I can do this after merge or would you like to push it to the PR? I can't commit directly to your branch

Requested in PR review: the variable now shows up in the admin settings
page (technical section, with de/en/es translations, and thereby in the
generated .env) and in the mkdocs environment-variables reference.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gunwald

gunwald commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Both done, just pushed. LOGIN_IMAGE now shows up in the technical section on /admin/settings with de/en/es translations, so it also lands in the generated .env. The generator writes an empty LOGIN_IMAGE= when the field is left blank, which is harmless because an empty value falls back to the bundled splash image. The mkdocs environment variables page got a row in the auth section plus a short note and an example.

@jzakotnik jzakotnik merged commit e95f5ba into jzakotnik:main Jul 5, 2026
@jzakotnik

Copy link
Copy Markdown
Owner

Mega 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Login Bild konfigurierbar machen

2 participants