()
| 34 | // Set VITE_KIMI_SERVER_HTTP_URL to connect directly to an absolute server |
| 35 | // origin instead (that path does require the server to send CORS headers). |
| 36 | function defaultServerOrigin(): string { |
| 37 | if (typeof window !== 'undefined' && window.location?.origin) { |
| 38 | return window.location.origin; |
| 39 | } |
| 40 | return 'http://127.0.0.1:58627'; |
| 41 | } |
| 42 | |
| 43 | export function normalizeServerOrigin(value: string | undefined): string { |
| 44 | const raw = value && value.trim() ? value : defaultServerOrigin(); |
no outgoing calls
no test coverage detected