|
|
@ -70,10 +70,13 @@ open class WebDav(val path: String, val authorization: Authorization) { |
|
|
|
} |
|
|
|
} |
|
|
|
private val webDavClient by lazy { |
|
|
|
private val webDavClient by lazy { |
|
|
|
val authInterceptor = Interceptor { chain -> |
|
|
|
val authInterceptor = Interceptor { chain -> |
|
|
|
val request = chain.request() |
|
|
|
var request = chain.request() |
|
|
|
.newBuilder() |
|
|
|
if (request.url.host == host) { |
|
|
|
.header(authorization.name, authorization.data) |
|
|
|
request = request |
|
|
|
.build() |
|
|
|
.newBuilder() |
|
|
|
|
|
|
|
.header(authorization.name, authorization.data) |
|
|
|
|
|
|
|
.build() |
|
|
|
|
|
|
|
} |
|
|
|
chain.proceed(request) |
|
|
|
chain.proceed(request) |
|
|
|
} |
|
|
|
} |
|
|
|
okHttpClient.newBuilder().run { |
|
|
|
okHttpClient.newBuilder().run { |
|
|
|