From bfcbca45f20fcb79351ce3f38139530233102509 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 16 Jul 2026 09:09:45 +0000 Subject: [PATCH] fix: use window.location.hostname for Carbone API URL instead of localhost --- static/carbone.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/carbone.js b/static/carbone.js index 9557937..2602f81 100644 --- a/static/carbone.js +++ b/static/carbone.js @@ -1,5 +1,6 @@ // Carbone Word Template Manager - Frontend -const CARBONE_API = 'http://localhost:8771/api/carbone'; +// Use same host as the page, just different port +const CARBONE_API = window.location.protocol + '//' + window.location.hostname + ':8771/api/carbone'; // ============================================================ // NAVIGATION