Skip to content

Commit f2f1b49

Browse files
raheeliftikhar5ludomikula
authored andcommitted
added base placeholder in api endpoints
1 parent d870df6 commit f2f1b49

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

client/packages/lowcoder/src/constants/apiConstants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const API_REQUEST_HEADERS: RawAxiosRequestHeaders = {
5252
"Content-Type": "application/json",
5353
};
5454

55-
export const SERVER_HOST = `${REACT_APP_API_SERVICE_URL ?? ""}`;
55+
export const SERVER_HOST = `${REACT_APP_API_SERVICE_URL ?? ""}/__LOWCODER_BASEPATH_PLACEHOLDER__`;
5656
export const ASSETS_URI = (id: string) => `${SERVER_HOST}/api/v1/assets/${id}`;
5757
export const USER_HEAD_UPLOAD_URL = `${SERVER_HOST}/api/v1/users/photo`;
5858
export const ORG_ICON_UPLOAD_URL = (orgId: string) => `${SERVER_HOST}/api/v1/organizations/${orgId}/logo`;

client/packages/lowcoder/vite.config.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const isVisualizerEnabled = !!process.env.ENABLE_VISUALIZER;
2525
// the file was never created
2626
// const browserCheckFileName = `browser-check-${process.env.REACT_APP_COMMIT_ID}.js`;
2727
const browserCheckFileName = `browser-check.js`;
28-
const base = ensureLastSlash("__LOWCODER_BASEPATH_PLACEHOLDER__");
28+
const base = isDev ? ensureLastSlash(process.env.PUBLIC_URL) : ensureLastSlash("__LOWCODER_BASEPATH_PLACEHOLDER__");
2929
// const base = ensureLastSlash(process.env.PUBLIC_URL);
3030

3131
if (!apiServiceUrl && isDev) {

0 commit comments

Comments
 (0)