fix: Incorrect page list in deployed branches (#12416)
This commit is contained in:
parent
a596d7101f
commit
7f390d0c00
|
|
@ -16,6 +16,7 @@ import store from "store";
|
|||
import { logoutUser } from "actions/userActions";
|
||||
import { AUTH_LOGIN_URL } from "constants/routes";
|
||||
import { getCurrentGitBranch } from "selectors/gitSyncSelectors";
|
||||
import getQueryParamsObject from "utils/getQueryParamsObject";
|
||||
|
||||
const executeActionRegex = /actions\/execute/;
|
||||
const timeoutErrorRegex = /timeout of (\d+)ms exceeded/;
|
||||
|
|
@ -38,11 +39,11 @@ const is404orAuthPath = () => {
|
|||
// this will be used to calculate the time taken for an action
|
||||
// execution request
|
||||
export const apiRequestInterceptor = (config: AxiosRequestConfig) => {
|
||||
const branch = getCurrentGitBranch(store.getState());
|
||||
const branch =
|
||||
getCurrentGitBranch(store.getState()) || getQueryParamsObject().branch;
|
||||
if (branch) {
|
||||
config.headers.branchName = branch;
|
||||
}
|
||||
|
||||
if (config.url?.indexOf("/git/") !== -1) {
|
||||
config.timeout = 1000 * 120; // increase timeout for git specific APIs
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user