Skip to content

Commit 97baf63

Browse files
authored
Merge pull request #765 from Noneangel/master
Fix Jellyfin CORS
2 parents d1fc8c3 + 3a40049 commit 97baf63

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

jellyfin.subdomain.conf.sample

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Version 2025/01/11
1+
## Version 2025/05/18
22
# make sure that your jellyfin container is named jellyfin
33
# make sure that your dns has a cname set for jellyfin
44
# 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 {
2222
set $upstream_app jellyfin;
2323
set $upstream_port 8096;
2424
set $upstream_proto http;
25-
add_header Access-Control-Allow-Origin "luna://com.webos.service.config" always;
25+
if ($http_user_agent ~ Web0S) {
26+
add_header Access-Control-Allow-Origin "luna://com.webos.service.config" always;
27+
}
2628
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
2729

2830
proxy_set_header Range $http_range;
@@ -35,7 +37,9 @@ server {
3537
set $upstream_app jellyfin;
3638
set $upstream_port 8096;
3739
set $upstream_proto http;
38-
add_header Access-Control-Allow-Origin "luna://com.webos.service.config" always;
40+
if ($http_user_agent ~ Web0S) {
41+
add_header Access-Control-Allow-Origin "luna://com.webos.service.config" always;
42+
}
3943
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
4044

4145
}

jellyfin.subfolder.conf.sample

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Version 2025/01/11
1+
## Version 2025/05/18
22
# make sure that your jellyfin container is named jellyfin
33
# if jellyfin is running in bridge mode and the container is named "jellyfin", the below config should work as is
44
# if not, replace the line "set $upstream_app jellyfin;" with "set $upstream_app <containername>;"
@@ -15,7 +15,9 @@ location ^~ /jellyfin/ {
1515
set $upstream_app jellyfin;
1616
set $upstream_port 8096;
1717
set $upstream_proto http;
18-
add_header Access-Control-Allow-Origin "luna://com.webos.service.config" always;
18+
if ($http_user_agent ~ Web0S) {
19+
add_header Access-Control-Allow-Origin "luna://com.webos.service.config" always;
20+
}
1921
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
2022

2123
proxy_set_header Range $http_range;

0 commit comments

Comments
 (0)