Skip to content

Commit

Permalink
update: UserAgent, for #38
Browse files Browse the repository at this point in the history
  • Loading branch information
cssxsh committed Mar 30, 2023
1 parent b960c94 commit 6726ad3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/kotlin/xyz/cssxsh/arknights/CacheDataHolder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ import java.io.*
public abstract class CacheDataHolder<K : CacheKey, R : CacheInfo> {
protected open val mutex: Mutex = Mutex()
protected open val http: HttpClient = HttpClient(OkHttp) {
BrowserUserAgent()
install(UserAgent) {
agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
}
ContentEncoding()
expectSuccess = true
install(HttpTimeout) {
Expand Down

0 comments on commit 6726ad3

Please sign in to comment.