From dd15bfcb859ca39d7a56b72d221b500266ef5c1c Mon Sep 17 00:00:00 2001 From: Noneangel <1888627+Noneangel@users.noreply.github.com> Date: Thu, 9 Jan 2025 18:38:42 +0100 Subject: [PATCH 1/2] Fix Jellyfin for WebOS --- jellyfin.subdomain.conf.sample | 8 +++++++- jellyfin.subfolder.conf.sample | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/jellyfin.subdomain.conf.sample b/jellyfin.subdomain.conf.sample index 36d1e73..ce586f0 100644 --- a/jellyfin.subdomain.conf.sample +++ b/jellyfin.subdomain.conf.sample @@ -1,4 +1,4 @@ -## Version 2024/08/22 +## Version 2025/01/09 # make sure that your jellyfin container is named jellyfin # make sure that your dns has a cname set for jellyfin # if jellyfin is running in bridge mode and the container is named "jellyfin", the below config should work as is @@ -22,6 +22,9 @@ server { set $upstream_app jellyfin; set $upstream_port 8096; set $upstream_proto http; + if ($http_user_agent ~ Web0S) { + add_header X-Frame-Options "" always; + } proxy_pass $upstream_proto://$upstream_app:$upstream_port; proxy_set_header Range $http_range; @@ -34,6 +37,9 @@ server { set $upstream_app jellyfin; set $upstream_port 8096; set $upstream_proto http; + if ($http_user_agent ~ Web0S) { + add_header X-Frame-Options "" always; + } proxy_pass $upstream_proto://$upstream_app:$upstream_port; } diff --git a/jellyfin.subfolder.conf.sample b/jellyfin.subfolder.conf.sample index 3d55e1a..5bdce9d 100644 --- a/jellyfin.subfolder.conf.sample +++ b/jellyfin.subfolder.conf.sample @@ -1,4 +1,4 @@ -## Version 2023/02/05 +## Version 2025/01/09 # make sure that your jellyfin container is named jellyfin # if jellyfin is running in bridge mode and the container is named "jellyfin", the below config should work as is # if not, replace the line "set $upstream_app jellyfin;" with "set $upstream_app ;" @@ -15,6 +15,9 @@ location ^~ /jellyfin/ { set $upstream_app jellyfin; set $upstream_port 8096; set $upstream_proto http; + if ($http_user_agent ~ Web0S) { + add_header X-Frame-Options "" always; + } proxy_pass $upstream_proto://$upstream_app:$upstream_port; proxy_set_header Range $http_range; From 6f715575e03b570188f6b8f5518f30e57845bfe2 Mon Sep 17 00:00:00 2001 From: Noneangel <1888627+Noneangel@users.noreply.github.com> Date: Sat, 11 Jan 2025 22:37:07 +0100 Subject: [PATCH 2/2] Use Access-Control-Allow-Origin --- jellyfin.subdomain.conf.sample | 10 +++------- jellyfin.subfolder.conf.sample | 6 ++---- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/jellyfin.subdomain.conf.sample b/jellyfin.subdomain.conf.sample index ce586f0..53a42d1 100644 --- a/jellyfin.subdomain.conf.sample +++ b/jellyfin.subdomain.conf.sample @@ -1,4 +1,4 @@ -## Version 2025/01/09 +## Version 2025/01/11 # make sure that your jellyfin container is named jellyfin # make sure that your dns has a cname set for jellyfin # if jellyfin is running in bridge mode and the container is named "jellyfin", the below config should work as is @@ -22,9 +22,7 @@ server { set $upstream_app jellyfin; set $upstream_port 8096; set $upstream_proto http; - if ($http_user_agent ~ Web0S) { - add_header X-Frame-Options "" always; - } + add_header Access-Control-Allow-Origin "luna://com.webos.service.config" always; proxy_pass $upstream_proto://$upstream_app:$upstream_port; proxy_set_header Range $http_range; @@ -37,9 +35,7 @@ server { set $upstream_app jellyfin; set $upstream_port 8096; set $upstream_proto http; - if ($http_user_agent ~ Web0S) { - add_header X-Frame-Options "" always; - } + add_header Access-Control-Allow-Origin "luna://com.webos.service.config" always; proxy_pass $upstream_proto://$upstream_app:$upstream_port; } diff --git a/jellyfin.subfolder.conf.sample b/jellyfin.subfolder.conf.sample index 5bdce9d..72c5ab3 100644 --- a/jellyfin.subfolder.conf.sample +++ b/jellyfin.subfolder.conf.sample @@ -1,4 +1,4 @@ -## Version 2025/01/09 +## Version 2025/01/11 # make sure that your jellyfin container is named jellyfin # if jellyfin is running in bridge mode and the container is named "jellyfin", the below config should work as is # if not, replace the line "set $upstream_app jellyfin;" with "set $upstream_app ;" @@ -15,9 +15,7 @@ location ^~ /jellyfin/ { set $upstream_app jellyfin; set $upstream_port 8096; set $upstream_proto http; - if ($http_user_agent ~ Web0S) { - add_header X-Frame-Options "" always; - } + add_header Access-Control-Allow-Origin "luna://com.webos.service.config" always; proxy_pass $upstream_proto://$upstream_app:$upstream_port; proxy_set_header Range $http_range;