fix: use window.location.hostname for Carbone API URL instead of localhost

This commit is contained in:
root
2026-07-16 09:09:45 +00:00
parent 9dc14b0f58
commit bfcbca45f2

View File

@@ -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