mirror of
https://github.com/thiloho/archtika.git
synced 2025-11-22 02:41:35 +01:00
Make API origin variable available on client side
This commit is contained in:
@@ -128,7 +128,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
script = ''
|
script = ''
|
||||||
ORIGIN=https://${cfg.domain} PORT=${toString cfg.webAppPort} ${pkgs.nodejs_22}/bin/node ${cfg.package}/web-app
|
PUBLIC_ORIGIN=https://${cfg.domain} ORIGIN=https://${cfg.domain} PORT=${toString cfg.webAppPort} ${pkgs.nodejs_22}/bin/node ${cfg.package}/web-app
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -146,5 +146,5 @@ export const handleImagePaste = async (event: ClipboardEvent) => {
|
|||||||
return newContent;
|
return newContent;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const API_BASE_PREFIX = dev ? "http://localhost:3000" : `${process.env.ORIGIN}/api`;
|
export const API_BASE_PREFIX = dev ? "http://localhost:3000" : `${import.meta.env.PUBLIC_ORIGIN}/api`;
|
||||||
export const NGINX_BASE_PREFIX = dev ? "http://localhost:18000" : "";
|
export const NGINX_BASE_PREFIX = dev ? "http://localhost:18000" : "";
|
||||||
|
|||||||
Reference in New Issue
Block a user