mirror of
https://github.com/mihonapp/mihon.git
synced 2025-02-08 03:01:27 +00:00
Lazily instantiate Cloudflare client
This commit is contained in:
parent
a5339969c9
commit
b3f5f13c39
1 changed files with 6 additions and 4 deletions
|
@ -61,8 +61,10 @@ class NetworkHelper(context: Context) {
|
||||||
builder.build()
|
builder.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
val cloudflareClient = client.newBuilder()
|
val cloudflareClient by lazy {
|
||||||
.addInterceptor(UserAgentInterceptor())
|
client.newBuilder()
|
||||||
.addInterceptor(CloudflareInterceptor(context))
|
.addInterceptor(UserAgentInterceptor())
|
||||||
.build()
|
.addInterceptor(CloudflareInterceptor(context))
|
||||||
|
.build()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue