fix entitlements on login
This commit is contained in:
1 parent
53355cad04
commit
30d7b3d258
17 files changed
+100
-46
No files matched your search
@@ -0,0 +1,27 @@
|
||||
import type { DeploymentMode } from "@/types/env";
|
||||
|
||||
export interface IEnvConfig {
|
||||
HOST: string;
|
||||
GLOBAL_REFRESH: number;
|
||||
API_BASE_URL: string;
|
||||
DEPLOYMENT_MODE: DeploymentMode;
|
||||
}
|
||||
|
||||
const rawRefresh = import.meta.env.VITE_APP_GLOBAL_REFRESH;
|
||||
const parsedRefresh = Number(rawRefresh);
|
||||
const GLOBAL_REFRESH = Number.isFinite(parsedRefresh) ? parsedRefresh : 60000;
|
||||
|
||||
const rawMode = import.meta.env.VITE_APP_DEPLOYMENT_MODE as
|
||||
| DeploymentMode
|
||||
| string
|
||||
| undefined;
|
||||
const DEPLOYMENT_MODE: DeploymentMode =
|
||||
rawMode === "saas" || rawMode === "self_hosted" ? (rawMode as DeploymentMode) : "self_hosted";
|
||||
|
||||
export const config: IEnvConfig = {
|
||||
HOST: import.meta.env.VITE_APP_HOST || "http://localhost:5173",
|
||||
GLOBAL_REFRESH,
|
||||
API_BASE_URL:
|
||||
import.meta.env.VITE_APP_API_BASE_URL || "http://localhost:52345/api/v1",
|
||||
DEPLOYMENT_MODE,
|
||||
};
|
||||
Reference in new issue
Block a user