From 6aec6a48d7991e1dd6a99c437f73f84c1a1cb674 Mon Sep 17 00:00:00 2001 From: proitlab Date: Tue, 23 Dec 2025 22:01:01 +0700 Subject: [PATCH] Check https --- main.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 447a9bc..4e454c0 100644 --- a/main.js +++ b/main.js @@ -30,7 +30,7 @@ function loadConfig() { return null; // Return null or default config if the file doesn't exist } -const config = { url_address: 'https://nexus.manage.backone.cloud/login/', +const config = { url_address: 'https://us.manage.backone.cloud/login/', app_name: 'Client', user_agent: 'BackOne-Client' }; @@ -58,7 +58,6 @@ const createWindow = () => { webPreferences: { preload: path.join(__dirname, 'preload.js') }, - //...(process.platform !== 'darwin' ? { titleBarOverlay: true } : {}) }) win.setTitle(`${config.app_name} ${app.getVersion()}`); @@ -94,7 +93,12 @@ app.on('ready', async () => { app.on('certificate-error', (event, webContents, url, error, cert, callback) => { // Verify the URL to ensure you only allow your intended self-signed certificate - if (url.startsWith(config.url_address)) { + const urlObject = new URL(config.url_address) + //if (url.startsWith(config.url_address)) { + //console.log(`${error}`) + //console.log(`${urlObject.protocol}//${urlObject.hostname}`) + //if (url.startsWith(`${urlObject.protocol}//${urlObject.hostname}`)) { + if (url.startsWith(`${urlObject.protocol}//`)) { // Prevent the default behavior (which is to reject the cert) event.preventDefault(); // Accept the certificate