[BUG] Custom CSS only works for logged-in admins #1504

Closed
opened 2026-02-05 02:08:28 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @jrasm91 on GitHub (Oct 25, 2023).

Originally assigned to: @danieldietzler on GitHub.

The bug

The new cusom css feature only works for admins, who are logged in, so it doesn't impact any unauthenticated routes (login page) or for any secondary users.

The OS that Immich Server is running on

N/A

Version of Immich Server

N/A

Version of Immich Mobile App

N/A

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

N/A

Your .env content

N/A

Reproduction steps

1. Create custom css
2. Go to the login page or Login with a non-admin user
3. Observe in immich-web log
...

Additional information

No response

Originally created by @jrasm91 on GitHub (Oct 25, 2023). Originally assigned to: @danieldietzler on GitHub. ### The bug The new cusom css feature only works for admins, who are logged in, so it doesn't impact any unauthenticated routes (login page) or for any secondary users. ### The OS that Immich Server is running on N/A ### Version of Immich Server N/A ### Version of Immich Mobile App N/A ### Platform with the issue - [X] Server - [X] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML N/A ``` ### Your .env content ```Shell N/A ``` ### Reproduction steps ```bash 1. Create custom css 2. Go to the login page or Login with a non-admin user 3. Observe in immich-web log ... ``` ### Additional information _No response_
Author
Owner

@Wingysam commented on GitHub (Oct 25, 2023):

I see what's wrong. The API I used requires the admin to be logged in and I didn't know that.

@Wingysam commented on GitHub (Oct 25, 2023): I see what's wrong. The API I used requires the admin to be logged in and I didn't know that.
Author
Owner

@jrasm91 commented on GitHub (Oct 25, 2023):

Yeah, feel free to work on it if you want, otherwise @danieldietzler can probably take a look. I believe we are thinking of solving this by:

  • Adding a new route GET /system-config/custom.css (public route)
  • Adding a new service method configService.getCustomCss()
  • The service implementation can load and return the css string with the right mime type.
  • Update the svelte GET handler to use the public endpoint
@jrasm91 commented on GitHub (Oct 25, 2023): Yeah, feel free to work on it if you want, otherwise @danieldietzler can probably take a look. I believe we are thinking of solving this by: - Adding a new route `GET /system-config/custom.css` (public route) - Adding a new service method `configService.getCustomCss()` - The service implementation can load and return the css string with the right mime type. - Update the svelte GET handler to use the public endpoint
Author
Owner

@Wingysam commented on GitHub (Oct 25, 2023):

I took a different route and added it to the ServerConfig, I'll make a PR with that now. It's possible that it's not the best way to do it but I hadn't seen your response when I did that.

@Wingysam commented on GitHub (Oct 25, 2023): I took a different route and added it to the ServerConfig, I'll make a PR with that now. It's possible that it's not the best way to do it but I hadn't seen your response when I did that.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1504