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) => {