use relative paths for reverse proxy

This commit is contained in:
johnwang16
2025-05-31 14:19:57 -04:00
parent 5dcfb37c4b
commit 692070de21
4 changed files with 8 additions and 8 deletions

View File

@@ -33,7 +33,7 @@ function versionUpdateUI(){
// Checks if a new version is available via the global app_state.json // Checks if a new version is available via the global app_state.json
function checkIfNewVersionAvailable() function checkIfNewVersionAvailable()
{ {
$.get('/php/server/query_json.php', { file: 'app_state.json', nocache: Date.now() }, function(appState) { $.get('php/server/query_json.php', { file: 'app_state.json', nocache: Date.now() }, function(appState) {
// console.log(appState["isNewVersionChecked"]) // console.log(appState["isNewVersionChecked"])
// console.log(appState["isNewVersion"]) // console.log(appState["isNewVersion"])

View File

@@ -18,7 +18,7 @@
function initOnlineHistoryGraph() { function initOnlineHistoryGraph() {
$.get('/php/server/query_json.php', { file: 'table_online_history.json', nocache: Date.now() }, function(res) { $.get('php/server/query_json.php', { file: 'table_online_history.json', nocache: Date.now() }, function(res) {
// Extracting data from the JSON response // Extracting data from the JSON response
var timeStamps = []; var timeStamps = [];
var onlineCounts = []; var onlineCounts = [];

View File

@@ -105,7 +105,7 @@
// ------------------------------------------------------------- // -------------------------------------------------------------
// Updates the backend application state/status in the header // Updates the backend application state/status in the header
function updateState(){ function updateState(){
$.get('/php/server/query_json.php', { file: 'app_state.json', nocache: Date.now() }, function(appState) { $.get('php/server/query_json.php', { file: 'app_state.json', nocache: Date.now() }, function(appState) {
document.getElementById('state').innerHTML = appState["currentState"].replaceAll('"', ''); document.getElementById('state').innerHTML = appState["currentState"].replaceAll('"', '');

View File

@@ -206,7 +206,7 @@ $settingsJSON_DB = json_encode($settings, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX
}, 3000); }, 3000);
} else } else
{ {
$.get('/php/server/query_json.php', { file: 'plugins.json', nocache: Date.now() }, function(res) { $.get('php/server/query_json.php', { file: 'plugins.json', nocache: Date.now() }, function(res) {
pluginsData = res["data"]; pluginsData = res["data"];
@@ -550,7 +550,7 @@ $settingsJSON_DB = json_encode($settings, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX
// collect values for each of the different input form controls // collect values for each of the different input form controls
// get settings to determine setting type to store values appropriately // get settings to determine setting type to store values appropriately
$.get('/php/server/query_json.php', { file: 'table_settings.json', nocache: Date.now() }, function(res) { $.get('php/server/query_json.php', { file: 'table_settings.json', nocache: Date.now() }, function(res) {
// loop through the settings definitions from the json // loop through the settings definitions from the json
res["data"].forEach(set => { res["data"].forEach(set => {
@@ -740,7 +740,7 @@ $settingsJSON_DB = json_encode($settings, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX
} else } else
{ {
// check if config file has been updated // check if config file has been updated
$.get('/php/server/query_json.php', { file: 'app_state.json', nocache: Date.now() }, function(appState) { $.get('php/server/query_json.php', { file: 'app_state.json', nocache: Date.now() }, function(appState) {
console.log("Settings: Got app_state.json"); console.log("Settings: Got app_state.json");