From 83cd53d23c73314772c4ae833b2008b087618537 Mon Sep 17 00:00:00 2001 From: NewTab <425698907@qq.com> Date: Thu, 20 Jan 2022 22:20:36 +0800 Subject: [PATCH] Update token_interceptor.dart --- lib/base/http/token_interceptor.dart | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/base/http/token_interceptor.dart b/lib/base/http/token_interceptor.dart index 294e872..bc24af4 100644 --- a/lib/base/http/token_interceptor.dart +++ b/lib/base/http/token_interceptor.dart @@ -13,10 +13,21 @@ class TokenInterceptor extends Interceptor { "Bearer " + getIt().token!; } - options.headers["User-Agent"] = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1"; + options.headers["User-Agent"] = + "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1"; options.headers["Content-Type"] = "application/json;charset=UTF-8"; - if (options.path != Url.loginByClientId && options.path!= Url.loginTwo) { + + // '/api/user/login', + // '/open/auth/token', + // '/api/user/two-factor/login', + // '/api/system', + // '/api/user/init', + // '/api/user/notification/init' + + if (options.path != Url.loginByClientId && + options.path != Url.loginTwo && + options.path != Url.login) { options.queryParameters["t"] = (DateTime.now().millisecondsSinceEpoch ~/ 1000).toString(); }