javascript - Cordova 5 whitelist, Content-Security-Policy and local network ip -


i error when trying load js files

refused load script 'http://192.168.1.10/js/test.js' because violates following content security policy directive: "script-src 'self' 'unsafe-inline' 'unsafe-eval'

what policy should use?

this meta

<meta http-equiv="content-security-policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'"> 

and white list in config.xml (root)

<access origin="http://192.168.1.10/*" /> <allow-navigation href="http://192.168.1.10/*" /> <allow-intent href="http://192.168.1.10/*" />    

i'm building on platform cordova 5, android@4.0.2 , testing on android 5.1.1

found solution, thought i'd post, forgot add url meta. hope helps :)

<meta http-equiv="content-security-policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval' http://192.168.1.10"> 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -