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
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["isNewVersion"])
@@ -48,4 +48,4 @@ function checkIfNewVersionAvailable()
}
// handle the dispaly of the NEW icon
checkIfNewVersionAvailable()
checkIfNewVersionAvailable()

View File

@@ -18,7 +18,7 @@
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
var timeStamps = [];
var onlineCounts = [];
@@ -53,4 +53,4 @@ function initOnlineHistoryGraph() {
</script>
<!-- <canvas id="clientsChart" width="800" height="140" class="extratooltipcanvas no-user-select"></canvas> -->
<canvas id="OnlineChart" style="width:100%; height: 150px; margin-bottom: 15px;"></canvas>
<canvas id="OnlineChart" style="width:100%; height: 150px; margin-bottom: 15px;"></canvas>

View File

@@ -105,7 +105,7 @@
// -------------------------------------------------------------
// Updates the backend application state/status in the header
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('"', '');

View File

@@ -206,7 +206,7 @@ $settingsJSON_DB = json_encode($settings, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX
}, 3000);
} 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"];
@@ -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
// 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
res["data"].forEach(set => {
@@ -740,7 +740,7 @@ $settingsJSON_DB = json_encode($settings, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX
} else
{
// 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");