您好,我使用提取功能构建了简单的api调用。它可以在邮递员和浏览器中正常工作。但是,当我在Andoid模拟器API 28中使用它时,出现以下错误:
Refused to connect to 'http://127.0.0.1:3000/user/login' because it violates the following Content Security Policy directive: "default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'". Note that 'connect-src' was not explicitly set, so 'default-src' is used as a fallback.
我添加config.xml
和index.html
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *;**script-src 'self' http://onlineerp.solution.quebec 'unsafe-inline' 'unsafe-eval';** ">
我尝试具有相同结果的多个标题。可以