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
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user