From 178a1136a63f9e1ac1abd4e4b7ad77e68e4e1fa4 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 25 Aug 2023 23:36:58 +0200 Subject: [PATCH 1/3] fix linter (#133) * fix linter * Update manifest.json * Auto-update README --------- Co-authored-by: yunohost-bot --- README.md | 2 +- README_fr.md | 2 +- conf/nginx.conf | 3 ++- manifest.json | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6b59068..a804bcb 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Jellyfin enables you to collect, manage, and stream your media. Run the Jellyfin server on your system and gain access to the leading free-software entertainment system, bells and whistles included. -**Shipped version:** 10.8.10~ynh1 +**Shipped version:** 10.8.10~ynh2 **Demo:** https://demo.jellyfin.org/stable/web/index.html diff --git a/README_fr.md b/README_fr.md index fa14c82..aba76bd 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Jellyfin vous permet de collecter, gérer et diffuser vos médias. Exécutez le serveur Jellyfin sur votre système et accédez au principal système de divertissement à logiciel libre. -**Version incluse :** 10.8.10~ynh1 +**Version incluse :** 10.8.10~ynh2 **Démo :** https://demo.jellyfin.org/stable/web/index.html diff --git a/conf/nginx.conf b/conf/nginx.conf index a259f72..b983196 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,12 +1,13 @@ #sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location __PATH__/ { + proxy_pass http://127.0.0.1:__PORT____PATH__/; proxy_pass_request_headers on; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-Host $http_host; + proxy_set_header X-Forwarded-Host $host; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $http_connection; diff --git a/manifest.json b/manifest.json index 41450fc..2a79b34 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Media System that manage and stream your media", "fr": "Système multimédia qui gère et diffuse vos médias" }, - "version": "10.8.10~ynh1", + "version": "10.8.10~ynh2", "url": "https://jellyfin.org", "upstream": { "license": "GPL-2.0-only", From c66a38f65dcff9eebe1785af2b35f63f3d825a4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sat, 2 Sep 2023 17:58:24 +0200 Subject: [PATCH 2/3] Set auth_header = false for SSO, because Jellyfin expects custom data in the Authorization header. --- scripts/install | 6 +++++- scripts/upgrade | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 7e62106..ed5e0f5 100644 --- a/scripts/install +++ b/scripts/install @@ -214,8 +214,12 @@ then ynh_permission_update --permission="main" --add="visitors" fi +# auth_header=false is because Jellyfin expects custom data in the Authorization HTTP header +# (notably, for Jellyfin Vue) +ynh_permission_url --permission="main" --auth_header=false + # Only the admin can access the admin panel of the app (if the app has an admin panel) -ynh_permission_create --permission="admin" --allowed=$admin +ynh_permission_create --permission="admin" --auth_header=false --allowed=$admin #================================================= # RELOAD NGINX diff --git a/scripts/upgrade b/scripts/upgrade index bcb90cd..3451332 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -86,9 +86,13 @@ fi if ! ynh_permission_exists --permission="admin"; then # Create the required permissions - ynh_permission_create --permission="admin" --allowed=$admin + ynh_permission_create --permission="admin" --auth_header=false --allowed=$admin fi +# Update SSO permissions with --auth_header=false (notably, for Jellyfin Vue) +ynh_permission_url --permission="main" --auth_header=false +ynh_permission_url --permission="admin" --auth_header=false + # If discovery key does not exist, create it if [ -z "$discovery" ]; then discovery=0 From 863be6cf600800dfab69ea2e1be4e48a2b687a60 Mon Sep 17 00:00:00 2001 From: Tagada <36127788+Tagadda@users.noreply.github.com> Date: Tue, 19 Sep 2023 04:57:33 +0200 Subject: [PATCH 3/3] Update remove --- scripts/remove | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/remove b/scripts/remove index 7bc6f51..0127d18 100644 --- a/scripts/remove +++ b/scripts/remove @@ -94,6 +94,7 @@ ynh_script_progression --message="Removing various files..." --weight=1 ynh_secure_remove --file="$final_path" ynh_secure_remove --file="$config_path" ynh_secure_remove --file="/etc/systemd/system/jellyfin.service.d" +ynh_secure_remove --file="/etc/sudoers.d/jellyfin-sudoers" # Remove the log files ynh_secure_remove --file="/var/log/$app"