From aa8d075ff0f8c2c040be90e60518b4921911e265 Mon Sep 17 00:00:00 2001 From: DatLag Date: Wed, 10 Jul 2024 22:09:05 +0200 Subject: [PATCH] support more hoster --- .../datlag/burningseries/module/PlatformModule.android.kt | 8 +++----- .../dev/datlag/burningseries/module/PlatformModule.jvm.kt | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/composeApp/src/androidMain/kotlin/dev/datlag/burningseries/module/PlatformModule.android.kt b/composeApp/src/androidMain/kotlin/dev/datlag/burningseries/module/PlatformModule.android.kt index 42fb1f76..88682579 100644 --- a/composeApp/src/androidMain/kotlin/dev/datlag/burningseries/module/PlatformModule.android.kt +++ b/composeApp/src/androidMain/kotlin/dev/datlag/burningseries/module/PlatformModule.android.kt @@ -67,9 +67,11 @@ actual object PlatformModule { } bindSingleton { HttpClient(OkHttp) { + followRedirects = true engine { config { followRedirects(true) + followSslRedirects(true) connectTimeout(3, TimeUnit.MINUTES) readTimeout(3, TimeUnit.MINUTES) writeTimeout(3, TimeUnit.MINUTES) @@ -84,11 +86,7 @@ actual object PlatformModule { } bindSingleton("STREAM_CLIENT") { HttpClient(OkHttp) { - engine { - config { - followRedirects(true) - } - } + followRedirects = true } } bindSingleton> { diff --git a/composeApp/src/jvmMain/kotlin/dev/datlag/burningseries/module/PlatformModule.jvm.kt b/composeApp/src/jvmMain/kotlin/dev/datlag/burningseries/module/PlatformModule.jvm.kt index 1faf3e5a..e32426b4 100644 --- a/composeApp/src/jvmMain/kotlin/dev/datlag/burningseries/module/PlatformModule.jvm.kt +++ b/composeApp/src/jvmMain/kotlin/dev/datlag/burningseries/module/PlatformModule.jvm.kt @@ -73,9 +73,11 @@ actual object PlatformModule { } bindSingleton { HttpClient(OkHttp) { + followRedirects = true engine { config { followRedirects(true) + followSslRedirects(true) connectTimeout(3, TimeUnit.MINUTES) readTimeout(3, TimeUnit.MINUTES) writeTimeout(3, TimeUnit.MINUTES) @@ -90,11 +92,7 @@ actual object PlatformModule { } bindSingleton("STREAM_CLIENT") { HttpClient(OkHttp) { - engine { - config { - followRedirects(true) - } - } + followRedirects = true } } bindSingleton> {