Files
wizarr/app/services/media/auth_headers.py
Matthieu B 31005dcf87 Fix recent onboarding and media-server bugs (#1318)
* fix: resolve button widget context URLs

Fixes #1280

* fix: return relative invitation API URLs

Fixes #1262

* fix: use modern Jellyfin auth headers

Fixes #1309

* fix: use Emby library GUIDs for access policy

Fixes #1303
2026-07-05 18:14:39 +02:00

8 lines
337 B
Python

def media_browser_auth_headers(token: str | None) -> dict[str, str]:
"""Return Jellyfin/Emby auth headers accepted by modern and legacy servers."""
headers = {"Accept": "application/json"}
if token:
headers["Authorization"] = f'MediaBrowser Token="{token}"'
headers["X-Emby-Token"] = token
return headers