拒绝加载 gap://ready 因为它没有出现在 Content Security Policy 的 child-src 指令中

Refused to load gap://ready because it does not appear in the child-src directive of the Content Security Policy

更新到新版本后 Xcode 我收到了这个错误:

Refused to load gap://ready because it does not appear in the child-src directive of the Content Security Policy.

这是 index.html 文件:

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="Content-Security-Policy" content="worker-src blob:; child-src blob: ;default-src * 'self' 'unsafe-inline' 'unsafe-eval' data: gap: content:">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui, viewport-fit=cover">

  <meta name="theme-color" content="#A83AFA">
  <meta name="format-detection" content="telephone=no">
  <meta name="msapplication-tap-highlight" content="no">
  <title>My app</title>
</head>
<body>
  <div id="app"></div>
  <% if (process.env.TARGET === 'cordova') { %>
    <script src="version.js"></script>
    <script src="cordova.js"></script>
  <% } %>
</body>
</html>

这是完整的调试器日志:

你有 gap: 在 default-src 中,但你也必须将它添加到 child-src