diff --git a/web/.env.example b/web/.env.example new file mode 100644 index 00000000..0f4e8826 --- /dev/null +++ b/web/.env.example @@ -0,0 +1 @@ +VITE_API_BASE_URL=http://localhost:8081 diff --git a/web/src/helpers/api.ts b/web/src/helpers/api.ts index 0d6a26a7..f318d1ef 100644 --- a/web/src/helpers/api.ts +++ b/web/src/helpers/api.ts @@ -1,7 +1,7 @@ import axios from "axios"; import { Resource } from "@/types/proto/api/v2/resource_service"; -axios.defaults.baseURL = import.meta.env.VITE_API_BASE_URL || window.location.origin; +axios.defaults.baseURL = import.meta.env.VITE_API_BASE_URL || ""; axios.defaults.withCredentials = true; export function getSystemStatus() {