From c6689d9f205dd81f120f8f889542804711c01db9 Mon Sep 17 00:00:00 2001 From: Chia-Jung Hsu Date: Mon, 1 Sep 2025 15:30:40 +0200 Subject: [PATCH] Fix APIs for preview and log in reverse proxy --- javascript/logMonitor.js | 2 +- modules/ui_extra_networks.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/javascript/logMonitor.js b/javascript/logMonitor.js index 9648ce43b..b625ec5bb 100644 --- a/javascript/logMonitor.js +++ b/javascript/logMonitor.js @@ -78,7 +78,7 @@ async function logMonitor() { for (const line of lines) addLogLine(line); if (!logConnected) { logConnected = true; - xhrPost('/sdapi/v1/log', { debug: 'connected' }); + xhrPost(`${window.api}/sdapi/v1/log`, { debug: 'connected' }); } } else { logConnected = false; diff --git a/modules/ui_extra_networks.py b/modules/ui_extra_networks.py index 06b3428fb..22d45a15d 100644 --- a/modules/ui_extra_networks.py +++ b/modules/ui_extra_networks.py @@ -170,7 +170,7 @@ class ExtraNetworksPage: def link_preview(self, filename): quoted_filename = urllib.parse.quote(filename.replace('\\', '/')) mtime = os.path.getmtime(filename) if os.path.exists(filename) else 0 - preview = f"/sdapi/v1/network/thumb?filename={quoted_filename}&mtime={mtime}" + preview = f"{shared.opts.subpath}/sdapi/v1/network/thumb?filename={quoted_filename}&mtime={mtime}" return preview def create_thumb(self):