Skip to content

Commit d741e67

Browse files
committed
refactor: remove user/pass replacement
1 parent 337af76 commit d741e67

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

app/src/main/kotlin/com/github/gotify/CoilInstance.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,12 @@ private class BasicAuthInterceptor : Interceptor {
108108

109109
// If there's no username, skip the authentication
110110
if (request.url.username.isNotEmpty()) {
111-
val basicAuthString = "${request.url.username}:${request.url.password}@"
112-
val url = request.url.toString().replace(basicAuthString, "")
113111
request = request
114112
.newBuilder()
115113
.header(
116114
"Authorization",
117115
Credentials.basic(request.url.username, request.url.password)
118116
)
119-
.url(url)
120117
.build()
121118
}
122119
return chain.proceed(request)

0 commit comments

Comments
 (0)