From fed81ed5f95e113efe7641d6427f46a471beac2b Mon Sep 17 00:00:00 2001 From: oxpoe Date: Tue, 13 Oct 2026 03:49:47 +0700 Subject: [PATCH] chore: selaraskan default server_port=3001 (Docker/healthcheck/wiki) --- app-customer.js | 2 +- config/settingsManager.js | 2 +- services/mikrotikService.js | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app-customer.js b/app-customer.js index 02935b4..5282cc4 100644 --- a/app-customer.js +++ b/app-customer.js @@ -1107,7 +1107,7 @@ app.post('/api/webhook/v1/payment-notif', multer().any(), async (req, res) => { // Variabel global untuk modul lain yang masih membaca konfigurasi (mis. skrip utilitas) global.appSettings = { - port: getSetting('server_port', 4555), + port: getSetting('server_port', 3001), host: getSetting('server_host', 'localhost'), genieacsUrl: getSetting('genieacs_url', 'http://localhost:7557'), genieacsUsername: getSetting('genieacs_username', ''), diff --git a/config/settingsManager.js b/config/settingsManager.js index 517ba57..ac0dcd9 100644 --- a/config/settingsManager.js +++ b/config/settingsManager.js @@ -99,7 +99,7 @@ function startSettingsWatcher() { try { const s = getSettingsWithCache(); - const port = s.server_port ?? 4555; + const port = s.server_port ?? 3001; const host = s.server_host || 'localhost'; const gurl = s.genieacs_url || '(tidak diatur)'; const company = s.company_header || '(default)'; diff --git a/services/mikrotikService.js b/services/mikrotikService.js index 2b5c4f7..6824888 100644 --- a/services/mikrotikService.js +++ b/services/mikrotikService.js @@ -1555,13 +1555,13 @@ async function generateIsolirPortalScript() { let port = 443; let isHttps = true; try { - const u = new URL(normalized || 'http://127.0.0.1:4555'); + const u = new URL(normalized || 'http://127.0.0.1:3001'); hostname = u.hostname; port = u.port ? parseInt(u.port, 10) : (u.protocol === 'https:' ? 443 : 80); isHttps = u.protocol === 'https:'; } catch { hostname = 'GANTI-host-portal-billing'; - port = 4555; + port = 3001; isHttps = false; } @@ -1724,7 +1724,7 @@ async function setupIsolirFirewall(routerId = null) { try { const raw = String(settings.app_url || '').trim(); const normalized = raw && /^https?:\/\//i.test(raw) ? raw : (raw ? `https://${raw}` : ''); - const u = new URL(normalized || 'http://127.0.0.1:4555'); + const u = new URL(normalized || 'http://127.0.0.1:3001'); const isHttps = u.protocol === 'https:'; const port = u.port ? parseInt(u.port, 10) : (isHttps ? 443 : 80); httpNatPort = isHttps ? 80 : port;