SDA-3221 Preventing navigation to http URLs (#1415)

This commit is contained in:
Salah Benmoussati 2022-05-09 17:46:47 +02:00 committed by GitHub
parent 9823d77761
commit 52342dc4e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -117,9 +117,9 @@ export const preventWindowNavigation = (
);
const listener = async (e: Electron.Event, winUrl: string) => {
if (!winUrl.startsWith('http' || 'https')) {
if (!winUrl.startsWith('https')) {
logger.error(
`window-utils: ${winUrl} doesn't start with http or https, so, not navigating!`,
`window-utils: ${winUrl} doesn't start with https, so, not navigating!`,
);
e.preventDefault();
return;