Files
NetAlertX/front/js/api.js
2026-01-10 03:06:02 +00:00

15 lines
346 B
JavaScript

function getApiBase()
{
let apiBase = getSetting("BACKEND_API_URL");
if(apiBase == "")
{
const protocol = window.location.protocol.replace(':', '');
const host = window.location.hostname;
const port = getSetting("GRAPHQL_PORT");
apiBase = `${protocol}://${host}:${port}`;
}
return apiBase;
}