Cordova whitelist plugin not working


i added whitelist plugins but it’s not working with me

ionic plugin add

index.html head

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


<gap:plugin name="cordova-plugin-whitelist" source="npm" />
  <access origin="*"/>
  <allow-intent href="*" />
  <allow-navigation href="*" />
  <allow-navigation href="data:*" />

Consol Error

XMLHttpRequest cannot load HTTP://WEBSITE.COM. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.

Ionic Version

Cordova Version

There is no problem with your meta data or whitelist configuration, you should enable cors on server side.

I ended up by deleting cors filter from web.xml in tomcat on my server side/localside.

Still not able to figure out how it will success with cors filters enabled.