You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ya...@apache.org on 2025/04/28 08:09:52 UTC
(pinot) branch master updated: Updating baseURL for knox support (#15596)
This is an automated email from the ASF dual-hosted git repository.
yashmayya pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new c6abcf2da1 Updating baseURL for knox support (#15596)
c6abcf2da1 is described below
commit c6abcf2da1bae7144c393da5c8ea334a7ff32764
Author: Himanshu Verma <us...@gmail.com>
AuthorDate: Mon Apr 28 13:39:47 2025 +0530
Updating baseURL for knox support (#15596)
---
pinot-controller/src/main/resources/app/utils/axios-config.ts | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pinot-controller/src/main/resources/app/utils/axios-config.ts b/pinot-controller/src/main/resources/app/utils/axios-config.ts
index 491c5e270b..0a8ff97505 100644
--- a/pinot-controller/src/main/resources/app/utils/axios-config.ts
+++ b/pinot-controller/src/main/resources/app/utils/axios-config.ts
@@ -80,11 +80,11 @@ export const getAxiosResponseInterceptor = (): (<T>(
return fulfilledResponseInterceptor;
};
-export const baseApi = axios.create({ baseURL: '/' });
+export const baseApi = axios.create({ baseURL: location.pathname });
baseApi.interceptors.request.use(getAxiosRequestInterceptor(), getAxiosErrorInterceptor());
baseApi.interceptors.response.use(getAxiosResponseInterceptor(), getAxiosErrorInterceptor());
-export const transformApi = axios.create({baseURL: '/', transformResponse: [data => data]});
+export const transformApi = axios.create({baseURL: location.pathname, transformResponse: [data => data]});
transformApi.interceptors.request.use(getAxiosRequestInterceptor(), getAxiosErrorInterceptor());
transformApi.interceptors.response.use(getAxiosResponseInterceptor(), getAxiosErrorInterceptor());
@@ -92,6 +92,6 @@ transformApi.interceptors.response.use(getAxiosResponseInterceptor(), getAxiosEr
// changing the handleError method of baseApi will cause current UI to break (as UI might have not handle error properly)
// creating a new axios instance baseApiWithErrors which can be used when adding new API's
// NOTE: It is an add-on utility and can be used in case you want to handle/show UI when API fails.
-export const baseApiWithErrors = axios.create({ baseURL: '/' });
+export const baseApiWithErrors = axios.create({ baseURL: location.pathname });
baseApiWithErrors.interceptors.request.use(getAxiosRequestInterceptor());
baseApiWithErrors.interceptors.response.use(getAxiosResponseInterceptor());
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org