replace default UA with device's UA#5430
Open
knighthat wants to merge 1 commit intojellyfin:masterfrom
Open
Conversation
Member
|
The source of truth for the user agent used in network requests is in our SDK. If we'd want to expand the usage of that user agent to other network requests (media3/coil) we'd have to expose the user agent string from the SDK or, likely the better solution, set it from the ApiClientFactory directly. |
Author
Member
If all of those devices use the same app version that is intended behavior. The user agent is to meant to identify the app, not the device. |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Changes
Current implementation uses default user agent from both JellyfinJDK and OkHttp. This inconsistence makes managing multiple devices a pain in the ass. On some stricter networks, presence of "okhttp" or default user agent will instantly get 403.
This PR aims to bring device's user agent as the default, so that devices can be easily ID'd on the network
Code assistance
No AI model was used to generate code (I don't like them looking at what I'm working on). Though, I did use Gemini to pinpoint the problem. I asked it why I could access Jellyfin on Amazon Silk (FireTV's web browser) but not in the app, coupling with some Nginx configuration on my end, it was able to pinpoint exact problem. I blocked
okhttpin UA, removing it did solve the issue, but I didn't want to compromise security for a streaming service.Issues
None that I can find
If there's another component that also makes network request that isn't "patched", please let me know.