mirror of
https://github.com/wizarrrr/wizarr.git
synced 2026-08-01 07:48:19 -04:00
* 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
8 lines
337 B
Python
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
|