Set Android client
This checks user-agent before X-OmnivoreClient so the more explicit X-OmnivoreClient overrides the derived client being set from user agent.
This commit is contained in:
@ -17,5 +17,7 @@ class Networker @Inject constructor(
|
||||
private suspend fun authToken() = datastoreRepo.getString(omnivoreAuthToken) ?: ""
|
||||
|
||||
suspend fun authenticatedApolloClient() = ApolloClient.Builder().serverUrl(serverUrl())
|
||||
.addHttpHeader("Authorization", value = authToken()).build()
|
||||
.addHttpHeader("Authorization", value = authToken())
|
||||
.addHttpHeader("X-OmnivoreClient", value = "android")
|
||||
.build()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user