mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-04-02 16:22:20 -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:
@@ -43,13 +43,10 @@ function getDeviceData() {
|
||||
mac = getMac()
|
||||
|
||||
console.log(mac);
|
||||
|
||||
const protocol = window.location.protocol.replace(':', '');
|
||||
const host = window.location.hostname;
|
||||
const apiToken = getSetting("API_TOKEN");
|
||||
const port = getSetting("GRAPHQL_PORT");
|
||||
let period = $("#period").val()
|
||||
|
||||
const apiBase = `${protocol}://${host}:${port}`;
|
||||
const apiBase = getApiBase();
|
||||
const url = `${apiBase}/device/${mac}?period=${encodeURIComponent(period)}`;
|
||||
|
||||
// get data from server
|
||||
|
||||
Reference in New Issue
Block a user