Check https

This commit is contained in:
2025-12-23 22:01:01 +07:00
parent c1afa0af20
commit 6aec6a48d7
+7 -3
View File
@@ -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