rebase
This commit is contained in:
@@ -29,7 +29,10 @@ import type {
|
||||
WorldPreset,
|
||||
} from "@/types";
|
||||
|
||||
const BASE_URL = "/api";
|
||||
// Use VITE_API_BASE_URL if set (for local `npm run dev` pointing at a separate
|
||||
// backend); otherwise default to relative "/api" which works behind the nginx
|
||||
// reverse proxy in the Docker deployment.
|
||||
const BASE_URL = (import.meta.env.VITE_API_BASE_URL as string | undefined)?.replace(/\/$/, "") || "/api";
|
||||
const ACCESS_TOKEN_KEY = "airpg_access_token";
|
||||
const REFRESH_TOKEN_KEY = "airpg_refresh_token";
|
||||
|
||||
|
||||
9
frontend/src/vite-env.d.ts
vendored
Normal file
9
frontend/src/vite-env.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
interface ImportMetaEnv {
|
||||
readonly VITE_API_BASE_URL?: string;
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv;
|
||||
}
|
||||
Reference in New Issue
Block a user