Add a base domain constant for flexibility

This commit is contained in:
2025-08-28 11:24:24 +03:00
Unverified
parent 15db9ea742
commit 34fd4fbfbf
+8 -2
View File
@@ -5,17 +5,23 @@
* @version 1.0.0
*/
/**
* Base domain name for all requests in production
* @constant
*/
export const BASE_DOMAIN = "fromchat.ru";
/**
* Base API endpoint for all backend requests
* @constant
*/
export const API_BASE_URL = `${location.host ? "" : "https://fromchat.toolbox-io.ru"}/api`;
export const API_BASE_URL = `${location.host ? "" : `https://${BASE_DOMAIN}`}/api`;
/**
* Full API URL including hostname and port for WebSocket connections
* @constant
*/
export const API_WS_BASE_URL = `${location.host || "fromchat.toolbox-io.ru"}/api`;
export const API_WS_BASE_URL = `${location.host || BASE_DOMAIN}/api`;
/**
* Application name displayed in UI and document title