mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-03 00:31:35 -07:00
FE+BE: BACKEND_API_URL for reverse proxies #1390
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
@@ -103,12 +103,9 @@ function loadSessionsData() {
|
||||
showSpinner();
|
||||
|
||||
// Build API base
|
||||
const protocol = window.location.protocol.replace(':', '');
|
||||
const host = window.location.hostname;
|
||||
const port = getSetting("GRAPHQL_PORT"); // or whatever port your Flask API runs on
|
||||
const apiToken = getSetting("API_TOKEN");
|
||||
|
||||
const apiBase = `${protocol}://${host}:${port}`;
|
||||
const apiBase = getApiBase();
|
||||
const url = `${apiBase}/sessions/${getMac()}?period=${encodeURIComponent(period)}`;
|
||||
|
||||
// Call API with Authorization header
|
||||
|
||||
Reference in New Issue
Block a user