From 494f01048e1b267a6b50ea91967472c2bed8adec Mon Sep 17 00:00:00 2001 From: netalertx-fedora <@gitconfigbackup.thehomelab.cc> Date: Fri, 9 Jan 2026 22:51:36 +0100 Subject: [PATCH] Use getApiBase() to get GraphQL Endpoint. --- front/systeminfoNetwork.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/front/systeminfoNetwork.php b/front/systeminfoNetwork.php index 048a47f3..99ceb540 100755 --- a/front/systeminfoNetwork.php +++ b/front/systeminfoNetwork.php @@ -336,13 +336,12 @@ function formatDataSize(bytes) { function loadInterfaces() { + // Build base URL dynamically + const apiBase = getApiBase(); const apiToken = getSetting("API_TOKEN"); - const host = window.location.hostname; - const protocol = window.location.protocol; - const port = getSetting("GRAPHQL_PORT"); $.ajax({ - url: `${protocol}//${host}:${port}/nettools/interfaces`, + url: `${apiBase}/nettools/interfaces`, type: "GET", headers: { "Authorization": "Bearer " + apiToken, @@ -418,4 +417,4 @@ $(document).ready(function() { }, 200); }); - \ No newline at end of file +