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

This commit is contained in:
Salah Benmoussati authored and GitHub committed 2022-05-09 17:46:47 +02:00
1 parent 9823d77761
commit 52342dc4e1
1 file changed
+2 -2
+2 -2
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;