mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix local chromecast play behind reverse proxy
When using a HTTPS reverse proxy (for eg. traefik in fron of docker jellyfin), there's no valid advertised local address. Let's default to external one in such case, relying on the home router to properly route it internally.
This commit is contained in:
parent
9677981344
commit
274ef0e532
1 changed files with 7 additions and 2 deletions
|
@ -187,8 +187,13 @@ define(['events'], function (events) {
|
|||
return apiClient.getEndpointInfo().then(function (endpoint) {
|
||||
if (endpoint.IsInNetwork) {
|
||||
return apiClient.getPublicSystemInfo().then(function (info) {
|
||||
addToCache(serverAddress, info.LocalAddress);
|
||||
return info.LocalAddress;
|
||||
var localAddress = info.LocalAddress
|
||||
if (!localAddress) {
|
||||
console.log("No valid local address returned, defaulting to external one")
|
||||
localAddress = serverAddress;
|
||||
}
|
||||
addToCache(serverAddress, localAddress);
|
||||
return localAddress;
|
||||
});
|
||||
} else {
|
||||
addToCache(serverAddress, serverAddress);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue