Check https
This commit is contained in:
@@ -30,7 +30,7 @@ function loadConfig() {
|
|||||||
return null; // Return null or default config if the file doesn't exist
|
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',
|
app_name: 'Client',
|
||||||
user_agent: 'BackOne-Client'
|
user_agent: 'BackOne-Client'
|
||||||
};
|
};
|
||||||
@@ -58,7 +58,6 @@ const createWindow = () => {
|
|||||||
webPreferences: {
|
webPreferences: {
|
||||||
preload: path.join(__dirname, 'preload.js')
|
preload: path.join(__dirname, 'preload.js')
|
||||||
},
|
},
|
||||||
//...(process.platform !== 'darwin' ? { titleBarOverlay: true } : {})
|
|
||||||
})
|
})
|
||||||
win.setTitle(`${config.app_name} ${app.getVersion()}`);
|
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) => {
|
app.on('certificate-error', (event, webContents, url, error, cert, callback) => {
|
||||||
// Verify the URL to ensure you only allow your intended self-signed certificate
|
// 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)
|
// Prevent the default behavior (which is to reject the cert)
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
// Accept the certificate
|
// Accept the certificate
|
||||||
|
|||||||
Reference in New Issue
Block a user