0
我們最近更新到Cordova iOS 4.1.1。升級iframes停止爲我們工作後(只顯示一個空白屏幕,它永遠不會加載)。我們懷疑這可能是一個安全問題。升級到Cordova後iframe無法加載iOS 4.1.1
我跟着蒞臨指導,沒有任何運氣:https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-whitelist/index.html
我結束了白名單/允許的一切,而不運氣
這是我在config.xml中:
<allow-navigation href="*" />
<allow-intent href="*" />
<access origin="*" />
這是我在index.html中有什麼:
<meta http-equiv="Content-Security-Policy"
content="default-src * 'unsafe-inline' 'unsafe-eval';
frame-src * 'self' 'unsafe-inline' 'unsafe-eval';
style-src * 'self' 'unsafe-inline' 'unsafe-eval';
script-src * 'self' 'unsafe-inline' 'unsafe-eval';">
An d這是iframe(動態加載):
<iframe title="title" frameborder="0" src="http://www.google.com/" style="width: 100%; height: 100%;"></iframe>