mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
fix configratio
This commit is contained in:
@@ -49,7 +49,7 @@ export interface GetIframeUrlRequest {
|
||||
|
||||
// Create a dedicated axios instance for Metabase API
|
||||
const metabaseAxios = axios.create({
|
||||
baseURL: getEnvUrl("VITE_CHRONICLE_URL"),
|
||||
baseURL: getEnvUrl("VITE_CHRONICLE_URL", false),
|
||||
});
|
||||
|
||||
// Add auth token interceptor
|
||||
|
||||
@@ -9,5 +9,3 @@ function normalizeBaseUrl(url: string) {
|
||||
export const AUDITLOG_API_URL: string = normalizeBaseUrl(
|
||||
getEnvUrl("VITE_AUDITLOG_API_URL", false),
|
||||
);
|
||||
|
||||
if (!AUDITLOG_API_URL) console.warn("Missing VITE_AUDITLOG_API_URL");
|
||||
|
||||
@@ -9,18 +9,12 @@ import {
|
||||
} from "../utils/authPersistence";
|
||||
import { handleSessionExpiry } from "./sessionExpiry";
|
||||
|
||||
if (!import.meta.env.VITE_CHRONICLE_URL) {
|
||||
console.warn("Missing VITE_CHRONICLE_URL — chronicle axios instance has no base URL");
|
||||
}
|
||||
|
||||
// Chronicle/audit-log backend is optional in this deployment — no warning
|
||||
// when unset; the module's screens are simply non-functional without it.
|
||||
const chronicleBaseUrl =
|
||||
getEnvUrl("VITE_CHRONICLE_URL", false) ||
|
||||
getEnvUrl("VITE_AUDITLOG_API_URL", false);
|
||||
|
||||
if (!chronicleBaseUrl) {
|
||||
console.warn("Missing VITE_CHRONICLE_URL and VITE_AUDITLOG_API_URL");
|
||||
}
|
||||
|
||||
const chronicleInstance = axios.create({
|
||||
baseURL: chronicleBaseUrl,
|
||||
});
|
||||
|
||||
@@ -8,14 +8,10 @@ import {
|
||||
} from "../utils/authPersistence";
|
||||
import { handleSessionExpiry } from "./sessionExpiry";
|
||||
|
||||
if (!import.meta.env.VITE_RECORD_API_URL) {
|
||||
console.warn(
|
||||
"Missing VITE_RECORD_API_URL — record axios instance has no base URL",
|
||||
);
|
||||
}
|
||||
|
||||
// Record backend is optional in this deployment — no warning when unset; the
|
||||
// module's screens are simply non-functional without it.
|
||||
const recordAxiosInstance = axios.create({
|
||||
baseURL: getEnvUrl("VITE_RECORD_API_URL"),
|
||||
baseURL: getEnvUrl("VITE_RECORD_API_URL", false),
|
||||
});
|
||||
|
||||
// Attach auth token and CSRF defence header to every request
|
||||
|
||||
@@ -8,7 +8,7 @@ import Cookies from "js-cookie";
|
||||
import { getEnvUrl } from "@/shared/config/env";
|
||||
|
||||
const TENANT_ID = "adf98293-41ba-4bda-bdb4-70e30a70c1b7";
|
||||
const API_URL = getEnvUrl("VITE_RECORD_API_URL");
|
||||
const API_URL = getEnvUrl("VITE_RECORD_API_URL", false);
|
||||
|
||||
const apiInstance = axios.create({
|
||||
baseURL: API_URL,
|
||||
|
||||
@@ -11,7 +11,7 @@ import Cookies from "js-cookie";
|
||||
import { getEnvUrl } from "@/shared/config/env";
|
||||
|
||||
const TENANT_ID = "adf98293-41ba-4bda-bdb4-70e30a70c1b7";
|
||||
const API_URL = getEnvUrl("VITE_RECORD_API_URL");
|
||||
const API_URL = getEnvUrl("VITE_RECORD_API_URL", false);
|
||||
|
||||
// Create axios instance for template API
|
||||
const apiInstance = axios.create({
|
||||
|
||||
Reference in New Issue
Block a user