Skip to content

Commit

Permalink
fix(android): default UA
Browse files Browse the repository at this point in the history
  • Loading branch information
lovegaoshi committed Dec 19, 2023
1 parent 16edb72 commit 632d6ac
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ private static HttpDataSource.Factory buildHttpDataSourceFactory(ReactContext co

if (requestHeaders != null) {
okHttpDataSourceFactory.setDefaultRequestProperties(requestHeaders);
if (!requestHeaders.containsKey("User-Agent")) {
okHttpDataSourceFactory.setUserAgent(getUserAgent(context));
}
} else {
okHttpDataSourceFactory.setUserAgent(getUserAgent(context));
}
Expand Down

0 comments on commit 632d6ac

Please sign in to comment.