|
@@ -29,6 +29,7 @@ class NetworkHelper(context: Context) {
|
|
|
.cache(Cache(cacheDir, cacheSize))
|
|
|
.connectTimeout(30, TimeUnit.SECONDS)
|
|
|
.readTimeout(30, TimeUnit.SECONDS)
|
|
|
+ .addInterceptor(UserAgentInterceptor())
|
|
|
|
|
|
if (BuildConfig.DEBUG) {
|
|
|
val httpLoggingInterceptor = HttpLoggingInterceptor().apply {
|
|
@@ -63,7 +64,6 @@ class NetworkHelper(context: Context) {
|
|
|
|
|
|
val cloudflareClient by lazy {
|
|
|
client.newBuilder()
|
|
|
- .addInterceptor(UserAgentInterceptor())
|
|
|
.addInterceptor(CloudflareInterceptor(context))
|
|
|
.build()
|
|
|
}
|