chore: selaraskan default server_port=3001 (Docker/healthcheck/wiki)
This commit is contained in:
1 parent
a68121544d
commit
fed81ed5f9
3 files changed
+5
-5
No files matched your search
+1
-1
@@ -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)
|
// Variabel global untuk modul lain yang masih membaca konfigurasi (mis. skrip utilitas)
|
||||||
global.appSettings = {
|
global.appSettings = {
|
||||||
port: getSetting('server_port', 4555),
|
port: getSetting('server_port', 3001),
|
||||||
host: getSetting('server_host', 'localhost'),
|
host: getSetting('server_host', 'localhost'),
|
||||||
genieacsUrl: getSetting('genieacs_url', 'http://localhost:7557'),
|
genieacsUrl: getSetting('genieacs_url', 'http://localhost:7557'),
|
||||||
genieacsUsername: getSetting('genieacs_username', ''),
|
genieacsUsername: getSetting('genieacs_username', ''),
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ function startSettingsWatcher() {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const s = getSettingsWithCache();
|
const s = getSettingsWithCache();
|
||||||
const port = s.server_port ?? 4555;
|
const port = s.server_port ?? 3001;
|
||||||
const host = s.server_host || 'localhost';
|
const host = s.server_host || 'localhost';
|
||||||
const gurl = s.genieacs_url || '(tidak diatur)';
|
const gurl = s.genieacs_url || '(tidak diatur)';
|
||||||
const company = s.company_header || '(default)';
|
const company = s.company_header || '(default)';
|
||||||
|
|||||||
@@ -1555,13 +1555,13 @@ async function generateIsolirPortalScript() {
|
|||||||
let port = 443;
|
let port = 443;
|
||||||
let isHttps = true;
|
let isHttps = true;
|
||||||
try {
|
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;
|
hostname = u.hostname;
|
||||||
port = u.port ? parseInt(u.port, 10) : (u.protocol === 'https:' ? 443 : 80);
|
port = u.port ? parseInt(u.port, 10) : (u.protocol === 'https:' ? 443 : 80);
|
||||||
isHttps = u.protocol === 'https:';
|
isHttps = u.protocol === 'https:';
|
||||||
} catch {
|
} catch {
|
||||||
hostname = 'GANTI-host-portal-billing';
|
hostname = 'GANTI-host-portal-billing';
|
||||||
port = 4555;
|
port = 3001;
|
||||||
isHttps = false;
|
isHttps = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1724,7 +1724,7 @@ async function setupIsolirFirewall(routerId = null) {
|
|||||||
try {
|
try {
|
||||||
const raw = String(settings.app_url || '').trim();
|
const raw = String(settings.app_url || '').trim();
|
||||||
const normalized = raw && /^https?:\/\//i.test(raw) ? raw : (raw ? `https://${raw}` : '');
|
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 isHttps = u.protocol === 'https:';
|
||||||
const port = u.port ? parseInt(u.port, 10) : (isHttps ? 443 : 80);
|
const port = u.port ? parseInt(u.port, 10) : (isHttps ? 443 : 80);
|
||||||
httpNatPort = isHttps ? 80 : port;
|
httpNatPort = isHttps ? 80 : port;
|
||||||
|
|||||||
Reference in new issue
Block a user