1 Commits

Author SHA1 Message Date
slfhstd 55f7c9d296 1.2.1 2026-03-13 14:14:02 +00:00
2 changed files with 15 additions and 3 deletions
+11
View File
@@ -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 # Changelog
All notable changes to the Update Server project will be documented in this file. All notable changes to the Update Server project will be documented in this file.
+4 -3
View File
@@ -147,7 +147,8 @@ ADMIN_HTML = """
background: white; background: white;
border-radius: 8px; border-radius: 8px;
padding: 25px; 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 { .card h2 {
margin-bottom: 20px; margin-bottom: 20px;
@@ -309,7 +310,7 @@ ADMIN_HTML = """
// Load bot versions on page load // Load bot versions on page load
function loadBots() { function loadBots() {
fetch(API_URL + '/api/versions') fetch('/api/versions')
.then(r => r.json()) .then(r => r.json())
.then(data => { .then(data => {
const list = document.getElementById('botList'); const list = document.getElementById('botList');
@@ -334,7 +335,7 @@ ADMIN_HTML = """
} }
function editBot(name) { function editBot(name) {
fetch(API_URL + '/api/version/' + name) fetch('/api/version/' + name)
.then(r => r.json()) .then(r => r.json())
.then(data => { .then(data => {
document.getElementById('botName').value = name; document.getElementById('botName').value = name;