Merge pull request #765 from Noneangel/master

Fix Jellyfin CORS
This commit is contained in:
quietsy 2025-05-19 16:27:25 +03:00 committed by GitHub
commit 97baf63322
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 5 deletions

View file

@ -1,4 +1,4 @@
## Version 2025/01/11 ## Version 2025/05/18
# make sure that your jellyfin container is named jellyfin # make sure that your jellyfin container is named jellyfin
# make sure that your dns has a cname set for 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 # if jellyfin is running in bridge mode and the container is named "jellyfin", the below config should work as is
@ -22,7 +22,9 @@ server {
set $upstream_app jellyfin; set $upstream_app jellyfin;
set $upstream_port 8096; set $upstream_port 8096;
set $upstream_proto http; set $upstream_proto http;
if ($http_user_agent ~ Web0S) {
add_header Access-Control-Allow-Origin "luna://com.webos.service.config" always; add_header Access-Control-Allow-Origin "luna://com.webos.service.config" always;
}
proxy_pass $upstream_proto://$upstream_app:$upstream_port; proxy_pass $upstream_proto://$upstream_app:$upstream_port;
proxy_set_header Range $http_range; proxy_set_header Range $http_range;
@ -35,7 +37,9 @@ server {
set $upstream_app jellyfin; set $upstream_app jellyfin;
set $upstream_port 8096; set $upstream_port 8096;
set $upstream_proto http; set $upstream_proto http;
if ($http_user_agent ~ Web0S) {
add_header Access-Control-Allow-Origin "luna://com.webos.service.config" always; add_header Access-Control-Allow-Origin "luna://com.webos.service.config" always;
}
proxy_pass $upstream_proto://$upstream_app:$upstream_port; proxy_pass $upstream_proto://$upstream_app:$upstream_port;
} }

View file

@ -1,4 +1,4 @@
## Version 2025/01/11 ## Version 2025/05/18
# make sure that your jellyfin container is named jellyfin # 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 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 <containername>;" # if not, replace the line "set $upstream_app jellyfin;" with "set $upstream_app <containername>;"
@ -15,7 +15,9 @@ location ^~ /jellyfin/ {
set $upstream_app jellyfin; set $upstream_app jellyfin;
set $upstream_port 8096; set $upstream_port 8096;
set $upstream_proto http; set $upstream_proto http;
if ($http_user_agent ~ Web0S) {
add_header Access-Control-Allow-Origin "luna://com.webos.service.config" always; add_header Access-Control-Allow-Origin "luna://com.webos.service.config" always;
}
proxy_pass $upstream_proto://$upstream_app:$upstream_port; proxy_pass $upstream_proto://$upstream_app:$upstream_port;
proxy_set_header Range $http_range; proxy_set_header Range $http_range;