Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Commit

Permalink
[release-2.2] fix: native login box pops up when the session expires (#…
Browse files Browse the repository at this point in the history
…837)

This is an automated cherry-pick of #836

/assign JohnNiang

```release-note
防止浏览器弹出原生登录框
```
  • Loading branch information
halo-dev-bot authored Feb 3, 2023
1 parent 561b8da commit d40b620
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils/api-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ axiosInstance.interceptors.response.use(
}
);

axiosInstance.defaults.headers.common["X-Requested-With"] = "XMLHttpRequest";

const apiClient = setupApiClient(axiosInstance);

function setupApiClient(axios: AxiosInstance) {
Expand Down

0 comments on commit d40b620

Please sign in to comment.