[release-2.2] fix: native login box pops up when the session expires (#837)

This is an automated cherry-pick of #836

/assign JohnNiang

```release-note
防止浏览器弹出原生登录框
```
pull/842/head
Halo Dev Bot 2023-02-03 16:24:11 +08:00 committed by GitHub
parent 561b8da237
commit d40b620b2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -100,6 +100,8 @@ axiosInstance.interceptors.response.use(
}
);
axiosInstance.defaults.headers.common["X-Requested-With"] = "XMLHttpRequest";
const apiClient = setupApiClient(axiosInstance);
function setupApiClient(axios: AxiosInstance) {