Remove Immich URL/API key from the config page
Build and push server image / build-and-push (push) Successful in 34s

Now that they're set via docker-compose.yml's environment (previous
commit), leaving editable fields for them on the page was misleading --
anything typed there would be silently overwritten by the env vars on the
next load() anyway. Replaced with a read-only info banner showing the
configured Immich URL (never the API key value, even though it's already
env-sourced rather than user input) or a warning if IMMICH_URL/
IMMICH_API_KEY aren't set. POST /api/config no longer accepts or touches
those two fields at all.

Verified: page renders with no immich_url/immich_api_key input fields or
API key value in either case (env vars set or unset); config save/albums/
frame-image still work end-to-end via a mock Immich server.
This commit is contained in:
2026-07-18 16:14:38 -04:00
parent d32236d832
commit bd72fdad71
2 changed files with 16 additions and 12 deletions
+4 -4
View File
@@ -61,16 +61,16 @@ def api_albums():
@app.post("/api/config")
def api_config_save(
immich_url: str = Form(""),
immich_api_key: str = Form(""),
album_id: str = Form(""),
order: str = Form("sequential"),
refresh_interval_s: int = Form(3600),
smart_crop_faces: bool = Form(True),
):
# Immich URL/API key are env-var only (IMMICH_URL/IMMICH_API_KEY, see
# docker-compose.yml.example) -- config.load() already applies them,
# and this handler doesn't touch cfg.immich_url/immich_api_key at all,
# so there's nothing here that could overwrite or clear them.
cfg = config.load()
cfg.immich_url = immich_url.strip()
cfg.immich_api_key = immich_api_key.strip()
if album_id != cfg.album_id:
cfg.cursor = 0 # restart from the top of a newly selected album
cfg.album_id = album_id