From 3a84f71fcd7394c72d5433ed5fc13bcf3139de68 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 20 Jan 2024 12:16:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E8=B7=AF=E5=BE=84=E6=B7=B7=E6=B7=86?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E7=99=BD=E5=90=8D=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/nnbc123/core/interceptor/PathInterceptor.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/src/main/java/com/nnbc123/core/interceptor/PathInterceptor.kt b/core/src/main/java/com/nnbc123/core/interceptor/PathInterceptor.kt index 040eb3fc4..760bd6950 100644 --- a/core/src/main/java/com/nnbc123/core/interceptor/PathInterceptor.kt +++ b/core/src/main/java/com/nnbc123/core/interceptor/PathInterceptor.kt @@ -12,6 +12,9 @@ import okhttp3.Response * Desc:路径转化 **/ class PathInterceptor : Interceptor { + + private val whiteList = listOf("/oauth/", "/acc/") + override fun intercept(chain: Interceptor.Chain): Response { val request = chain.request() val builder = request.newBuilder() @@ -20,6 +23,11 @@ class PathInterceptor : Interceptor { if (!url.toString().startsWith(UriProvider.API_URL)) { return chain.proceed(request) } + if (whiteList.firstOrNull { + path.contains(it) + } != null) { + return chain.proceed(request) + } val newPath = DESUtils.DESAndBase64(path) return if (newPath.isNullOrEmpty()) { chain.proceed(request)