feat:路径混淆支持白名单
This commit is contained in:
@@ -12,6 +12,9 @@ import okhttp3.Response
|
||||
* Desc:路径转化
|
||||
**/
|
||||
class PathInterceptor : Interceptor {
|
||||
|
||||
private val whiteList = listOf<String>("/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)
|
||||
|
Reference in New Issue
Block a user