Download sau_frontend/src/utils/apiBase.js from supff/sau: direct link, hf CLI and curl.
- Browser
- Download file 393 Bytes
-
https://huggingface.co/spaces/supff/sau/resolve/main/sau_frontend/src/utils/apiBase.js
- Command line
-
hf download hf://spaces/supff/sau/sau_frontend/src/utils/apiBase.js
-
curl -L -o apiBase.js https://huggingface.co/spaces/supff/sau/resolve/main/sau_frontend/src/utils/apiBase.js
393 Bytes
| /** | |
| * 生产环境前后端同源(Docker / Hugging Face Space)时请在 .env.production 中设 VITE_API_BASE_URL 为空。 | |
| * 开发环境使用 .env.development 中的 /api(Vite 代理到后端)。 | |
| */ | |
| export function getApiBase() { | |
| const v = import.meta.env.VITE_API_BASE_URL | |
| if (v != null && String(v).trim() !== '') { | |
| return String(v).replace(/\/$/, '') | |
| } | |
| return '' | |
| } | |