mirror of
https://github.com/mihonapp/mihon.git
synced 2025-10-08 20:39:34 +02:00
Lazily instantiate Cloudflare client
This commit is contained in:
@@ -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()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user