From 55f7c9d29629025c67c9cd014c759666f293c060 Mon Sep 17 00:00:00 2001 From: Slfhstd Date: Fri, 13 Mar 2026 14:14:02 +0000 Subject: [PATCH] 1.2.1 --- CHANGELOG.md | 11 +++++++++++ app.py | 7 ++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51ee4c2..ade9262 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +# [1.2.1] - 2026-03-13 + +### Fixed +- Admin GUI now uses direct relative paths for all API fetch calls, ensuring compatibility with reverse proxy setups (Nginx, Caddy, etc.) +- No port is appended in JavaScript fetch requests, so `/api/versions` loads correctly from the admin domain. + +### Changed +- Updated admin HTML in app.py to remove `API_URL` variable and use direct relative paths for all API calls. + +--- + # Changelog All notable changes to the Update Server project will be documented in this file. diff --git a/app.py b/app.py index 5fd6f45..e1a3910 100644 --- a/app.py +++ b/app.py @@ -147,7 +147,8 @@ ADMIN_HTML = """ background: white; border-radius: 8px; padding: 25px; - box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); + // Use direct relative paths for API calls + // No API_URL needed } .card h2 { margin-bottom: 20px; @@ -309,7 +310,7 @@ ADMIN_HTML = """ // Load bot versions on page load function loadBots() { - fetch(API_URL + '/api/versions') + fetch('/api/versions') .then(r => r.json()) .then(data => { const list = document.getElementById('botList'); @@ -334,7 +335,7 @@ ADMIN_HTML = """ } function editBot(name) { - fetch(API_URL + '/api/version/' + name) + fetch('/api/version/' + name) .then(r => r.json()) .then(data => { document.getElementById('botName').value = name;