mirror of
https://github.com/fromchat-messenger/web.git
synced 2026-09-22 19:15:08 +03:00
Add a base domain constant for flexibility
This commit is contained in:
@@ -5,17 +5,23 @@
|
|||||||
* @version 1.0.0
|
* @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
|
* Base API endpoint for all backend requests
|
||||||
* @constant
|
* @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
|
* Full API URL including hostname and port for WebSocket connections
|
||||||
* @constant
|
* @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
|
* Application name displayed in UI and document title
|
||||||
|
|||||||
Reference in New Issue
Block a user