Support for custom headers?
Describe the feature you'd like
Hi,
Would it be possible to include the ability to add custom headers. Something like x-api-key etc, so Jellyfin instances which are behind reverse proxies and auths like authelia for example, can use those headers to bypass those mechanisms for the mobile app. This way the mobile app would be able to communicate with the Jellyfin server, while it being still secured.
Apple also released their own OpenAPI-Generator, which accepts an URL-Session parameter, which can be used to add custom headers. But the last time I tried the Jellyfin-API-spec could not be parsed by Apple's implementation because it has cyclic dependencies, and replacing the entire API backend seems like a big feat.
I will leave this here for anyone else willing to try this it's not as easy as you may think, and it's certainly more work than I am currently able to put into this.
We do not use that project, we use https://github.com/jellyfin/jellyfin-sdk-swift. The main issue with custom headers isn't our SDK but passing those along to VLCKit which doesn't support custom headers.
This should be easy for implementation within our SDK and passing along to AVPlayer, but I'm not convinced to have this implementation until our "main" player supports it, which the transition to mpv will help with (since it can do custom headers).
- https://github.com/jellyfin/jellyfin-sdk-swift/blob/main/Sources/JellyfinClient.swift#L29C31-L29C54
- https://developer.apple.com/documentation/foundation/urlsessionconfiguration/1411532-httpadditionalheaders
- https://stackoverflow.com/questions/15456130/add-custom-header-field-in-request-of-avplayer
Than I apologize, I didn't look properly for the SDK, sorry 😅