index: mark blank local CSP as dangerous option
This commit is contained in:
parent
43335e3dbd
commit
1c573e2fb5
@ -80,9 +80,10 @@ const getParentDir = () => {
|
|||||||
return dirname(place);
|
return dirname(place);
|
||||||
};
|
};
|
||||||
|
|
||||||
const checkForDangerousOptions = ({ allowHTTP, allowNavigation }) => {
|
const checkForDangerousOptions = ({ allowHTTP, allowNavigation, localCSP }) => {
|
||||||
if (allowHTTP === true) dangerousAPI('Gluon.open', 'allowHTTP', 'true');
|
if (allowHTTP === true) dangerousAPI('Gluon.open', 'allowHTTP', 'true');
|
||||||
if (allowNavigation === true) dangerousAPI('Gluon.open', 'allowNavigation', 'true');
|
if (allowNavigation === true) dangerousAPI('Gluon.open', 'allowNavigation', 'true');
|
||||||
|
if (localCSP === '') dangerousAPI('Gluon.open', 'localCSP', '\'\'');
|
||||||
};
|
};
|
||||||
|
|
||||||
export const open = async (url, opts = {}) => {
|
export const open = async (url, opts = {}) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user