Files
tkmind_go/ui/desktop/src/config.ts
T
Douwe Osinga d1e38fba32 Make the client more secure (#3742)
Co-authored-by: Douwe Osinga <douwe@squareup.com>
Co-authored-by: Michael Neale <michael.neale@gmail.com>
2025-07-31 19:20:37 +02:00

10 lines
355 B
TypeScript

// Helper to construct API endpoints
export const getApiUrl = (endpoint: string): string => {
const baseUrl =
String(window.appConfig.get('GOOSE_API_HOST') || '') +
':' +
String(window.appConfig.get('GOOSE_PORT') || '');
const cleanEndpoint = endpoint.startsWith('/') ? endpoint : `/${endpoint}`;
return `${baseUrl}${cleanEndpoint}`;
};