重写
This commit is contained in:
@@ -518,7 +518,8 @@ export async function fetchWithApiAuth(
|
||||
} catch {
|
||||
clearStoredAccessToken();
|
||||
}
|
||||
} else if (response.status === 401) {
|
||||
} else if (response.status === 401 && hasAuthHeader && !options.skipAuth) {
|
||||
// 公开只读请求不能因为服务端异常 401 顺手把正式登录态清空。
|
||||
clearStoredAccessToken();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user