Download webui/src/utils/runtimeEnv.js from a3216/ds2api: direct link, hf CLI and curl.
- Browser
- Download file 489 Bytes
-
https://huggingface.co/spaces/a3216/ds2api/resolve/ce5a019598af8a3a8fa70d3880098df3e850ecd7/webui/src/utils/runtimeEnv.js
- Command line
-
hf download hf://spaces/a3216/ds2api@ce5a019598af8a3a8fa70d3880098df3e850ecd7/webui/src/utils/runtimeEnv.js
-
curl -L -o runtimeEnv.js https://huggingface.co/spaces/a3216/ds2api/resolve/ce5a019598af8a3a8fa70d3880098df3e850ecd7/webui/src/utils/runtimeEnv.js
489 Bytes
| export function detectRuntimeEnv() { | |
| const deployTarget = String(import.meta.env.VITE_DEPLOY_TARGET || '').trim().toLowerCase() | |
| if (deployTarget === 'vercel') { | |
| return { isVercel: true, source: 'vite_env' } | |
| } | |
| const host = typeof window !== 'undefined' ? String(window.location.hostname || '').toLowerCase() : '' | |
| if (host.includes('vercel.app')) { | |
| return { isVercel: true, source: 'hostname' } | |
| } | |
| return { isVercel: false, source: 'default' } | |
| } | |