mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-29 02:11:28 -06:00
SDA-3221 Preventing navigation to http URLs (#1415)
This commit is contained in:
parent
9823d77761
commit
52342dc4e1
@ -117,9 +117,9 @@ export const preventWindowNavigation = (
|
|||||||
);
|
);
|
||||||
|
|
||||||
const listener = async (e: Electron.Event, winUrl: string) => {
|
const listener = async (e: Electron.Event, winUrl: string) => {
|
||||||
if (!winUrl.startsWith('http' || 'https')) {
|
if (!winUrl.startsWith('https')) {
|
||||||
logger.error(
|
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();
|
e.preventDefault();
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user