mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-03-30 23:03:03 -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:
@@ -416,12 +416,9 @@ async function renderSmallBoxes() {
|
||||
showSpinner();
|
||||
|
||||
// Get data from the server
|
||||
const protocol = window.location.protocol.replace(':', '');
|
||||
const host = window.location.hostname;
|
||||
const apiToken = getSetting("API_TOKEN");
|
||||
const port = getSetting("GRAPHQL_PORT"); // same port your Flask app runs on
|
||||
|
||||
const apiBase = `${protocol}://${host}:${port}`;
|
||||
const apiBase = getApiBase();
|
||||
const url = `${apiBase}/device/${getMac()}?period=${encodeURIComponent(period)}`;
|
||||
|
||||
const response = await fetch(url, {
|
||||
|
||||
Reference in New Issue
Block a user