sencha touch - Refused to connect to any URLs in Cordova android app -


i developing cordova android mobile app. using sencha touch ui framework. within app im making web service calls. used work fine old version of cordova, upgraded cordova proj 5.0.0, on not able access of web services on newer version of android devices. have included whitelisting plugin in project. have included following meta tag in index.html

<meta http-equiv="content-security-policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *"> 

config.xml :

<content src="index.html" /> <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:*" /> 

while running app following error thrown,

"refused connect 'http://my-server-url.ss.yy.com:8080/someserv/rest/someapp/appdata?_dc=1433398248330' because violates following content security policy directive: "default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-inline' 'unsafe-eval'". note 'connect-src' not explicitly set, 'default-src' used fallback. 

im unable move forward here. tried lot of suggestions on google of no use. please guide me missing piece here.

note : within app im connecting more 1 servers.

thanks in advance!!

you need add servers url on meta tag, way:

<meta http-equiv="content-security-policy" content="default-src 'self' my-server-url.ss.yy.com:8080  data: gap: https://ssl.gstatic.com 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *; connect-src *"> 

then connections my-server-url.ss.yy.com:8080 allowed security policy.


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 -