path correction

This commit is contained in:
sandhiya-hepl
2026-07-15 18:10:26 +05:30
parent 35e439e69c
commit e84c1adac4
19 changed files with 87 additions and 35 deletions
+12
View File
@@ -0,0 +1,12 @@
/**
* API origin/path prefix.
* - Dev (base "/"): "" → /api/... via Vite proxy
* - Prod (base "/citpl_website/"): "/citpl_website" → /citpl_website/api/...
* Override with VITE_API_BASE when the API is hosted elsewhere.
*/
export const API_BASE = (
import.meta.env.VITE_API_BASE
?? import.meta.env.VITE_API_URL
?? import.meta.env.BASE_URL
?? '/'
).replace(/\/$/, '');