jeffvli / feishin

A modern self-hosted music player.
https://feishin.vercel.app
GNU General Public License v3.0
2.36k stars 96 forks source link

Weird login issue with docker SERVER_LOCK #703

Closed Anexgohan closed 1 week ago

Anexgohan commented 1 month ago

Expected Behavior

Login with SERVER_LOCK should be the same for http://: and https://music.domain.com

Current Behavior

when logging in using "SERVER_NAME", "SERVER_TYPE", "SERVER_URL", SERVER_LOCK=true using address "http://:" the SERVER_NAME and SERVER_URL are prefilled, so SERVER_LOCK works NVIDIA_Share_U6izsqmUDo

when changing nothing, just logging in via Nginx proxy manager using address "https://music.domain.com" the SERVER_NAME and SERVER_URL are not prefilled but blank, SERVER_LOCK usless NVIDIA_Share_XLqxR0qvgs

Steps to Reproduce

my compose:

services:
  feishin:
    container_name: feishin
    image: 'ghcr.io/jeffvli/feishin:latest'
    restart: unless-stopped
    environment:
      - SERVER_NAME=Jellyfin # pre defined server name
      - SERVER_TYPE=jellyfin # jellyfin, navidrome also works
      # - SERVER_URL=https://jellyfin.domain.com # jellyfin url
      - SERVER_URL=http://192.168.100.202:8096 # jellyfin url ip
      - SERVER_LOCK=true # When true AND name/type/url are set, only username/password can be toggled, To prevent users from changing above settings.
      - PUID=1000
      - PGID=1000
      - UMASK=002
      - TZ=America/New_York
    ports:
      - 17623:9180

To reproduce:

  1. using above compose change the SERVER_URL from "http://192.168.100.202:8096" to "https://jellyfin.domain.com"
  2. enable proxy in nginx proxy manager to route https://jellyfin.domain.com through
  3. login.
  4. blank "SERVER_NAME, SERVER_URL and SERVER_LOCK", as if the setting get just ignored
  5. Tested on Jellyfin and Navidrome with the same result

Possible Solution

I have no idea.

Context

can only login locally otherwise i have to make my users enter SERVER_NAME and SERVER_URL also, which kind of defeats the purpose of SERVER_NAME and SERVER_URL and SERVER_LOCK settings

Application version

0.7.3

Operating System and version

docker running under debian proxmox

Server and Version

Jellyfin 10.9.8

Node Version (if developing locally)

No response

kgarner7 commented 3 weeks ago

I'm unable to reproduce this issue; if I use a very basic setting

services:
    feishin:
        container_name: feishin
        image: ghcr.io/jeffvli/feishin:latest
        restart: unless-stopped
        environment:
            - SERVER_NAME=Jellyfin # pre defined server name
            - SERVER_TYPE=jellyfin # jellyfin, navidrome also works
            - SERVER_URL=https://jellyfin.domain.com # jellyfin url
            # - SERVER_URL=http://192.168.100.202:8096 # jellyfin url ip
            - SERVER_LOCK=true
        ports:
            - 9180:9180

then I see the correct behavior, regardless of what which of the two server URLs I pass in. You can try

console.log(window.SERVER_URL, window.SERVER_NAME, window.SERVER_TYPE, window.SERVER_LOCK)

in the inspect element console to verify the items are being set correctly

As an aside note that PGID, PUID, UMASK, and TZ are not used at all; this isn't a linuxserver.io Docekr image.

kgarner7 commented 1 week ago

Closing for inactivity. If this is still an issue, please reopen with additional details