Make login page background image configurable via LOGIN_IMAGE#443
Merged
Conversation
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.
354ac57 to
189b3fd
Compare
Owner
|
2 items open
@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>
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. |
Owner
|
Mega 💯 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #418
The login page hardcoded the bundled splash image. This wires the already-documented
LOGIN_IMAGEenv var so each deployment can set its own login background.What changed
getServerSidePropsreadsLOGIN_IMAGE(a filename in/public) and the login page uses it, falling back to the bundled splash when unset.lib/loginImage.ts) resolves the path for both the login page andproxy.ts, so the auth allowlist matches the URL the page requests — otherwise the/publicimage is gated and 307-redirected to login, leaving the background blank..env_example.Notes
img-src 'self').🤖 Generated with Claude Code