From f9a26f135198b46ffdba251b2a218cce93ce54b9 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Sat, 31 Jan 2026 08:46:25 +0100 Subject: [PATCH] fix(factory): Use same-origin API calls for HAProxy compatibility Change API base URL to use relative /factory/ path instead of absolute URL with port 7331. HAProxy routes /factory/* API paths to the factory backend while serving UI from luci backend. This fixes mixed content blocking when accessing via HTTPS. Co-Authored-By: Claude Opus 4.5 --- package/secubox/secubox-p2p/root/www/factory/index.html | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/package/secubox/secubox-p2p/root/www/factory/index.html b/package/secubox/secubox-p2p/root/www/factory/index.html index ac208b9b..5b7306ee 100644 --- a/package/secubox/secubox-p2p/root/www/factory/index.html +++ b/package/secubox/secubox-p2p/root/www/factory/index.html @@ -140,10 +140,8 @@ let tools = []; let refreshInterval = null; - // API helpers - API runs on port 7331 - const apiBase = window.location.port === '7331' - ? '/factory/' - : 'http://' + window.location.hostname + ':7331/factory/'; + // API helpers - use same origin (HAProxy routes /factory/* to API) + const apiBase = '/factory/'; const api = { get: async (path) => {