Currenlty Я внедряюсь на онлайн-сайт в приложении cordova; мой config.xml является следующее:Разрешить iframe выполнить команду cordova
<plugin name="cordova-plugin-whitelist" spec="1" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<allow-navigation href="*" />
и мой index.html имеют следующий мета-тег:
<meta http-equiv="Content-Security-Policy" content="default-src *;
style-src * 'self' 'unsafe-inline' 'unsafe-eval';
script-src * 'self' 'unsafe-inline' 'unsafe-eval';">
теперь мне нужно выполнить команду codova (приложения) от внутреннего сайта я использую следующий код:
window.parent.cordova.plugins.barcodeScanner.scan(function (result) {},
function (error) {});
но это (правильно) при отсутствии с:
Uncaught SecurityError: Blocked a frame with origin "http://" from accessing a frame with origin "file://". The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "file". Protocols must match.
Как я могу разрешить такое взаимодействие с внешним сайтом в моем приложении?