mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
perf(X-Pack): 优化 Token 刷新机制,避免非必要开销
This commit is contained in:
committed by
fit2cloud-chenyw
parent
471c54821d
commit
b822b8a41f
@@ -55,7 +55,7 @@ export const configHandler = config => {
|
||||
if (wsCache.get('user.token')) {
|
||||
config.headers['X-DE-TOKEN'] = wsCache.get('user.token')
|
||||
const expired = isExpired()
|
||||
if (expired && config.url !== refreshUrl) {
|
||||
if (expired && !config.url.includes(refreshUrl)) {
|
||||
if (!getRefreshStatus()) {
|
||||
setRefreshStatus(true)
|
||||
refreshApi(Date.now())
|
||||
|
||||
Reference in New Issue
Block a user