From d741e678a85b31e91575ec1a19bd28b626852882 Mon Sep 17 00:00:00 2001 From: Jannis Mattheis Date: Sun, 7 Jul 2024 09:05:58 +0200 Subject: [PATCH] refactor: remove user/pass replacement --- app/src/main/kotlin/com/github/gotify/CoilInstance.kt | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/src/main/kotlin/com/github/gotify/CoilInstance.kt b/app/src/main/kotlin/com/github/gotify/CoilInstance.kt index 9c0dd78..21adaa6 100644 --- a/app/src/main/kotlin/com/github/gotify/CoilInstance.kt +++ b/app/src/main/kotlin/com/github/gotify/CoilInstance.kt @@ -108,15 +108,12 @@ private class BasicAuthInterceptor : Interceptor { // If there's no username, skip the authentication if (request.url.username.isNotEmpty()) { - val basicAuthString = "${request.url.username}:${request.url.password}@" - val url = request.url.toString().replace(basicAuthString, "") request = request .newBuilder() .header( "Authorization", Credentials.basic(request.url.username, request.url.password) ) - .url(url) .build() } return chain.proceed(request)