White list is necessary?


#1

does white list necessary for ionic ios / android?

I have server that is from different host than what ionic app is.


#2

Yes, it is mandatory since Cordova 4.0.

Also don’t forget that Android needs additional permissions to access the internet:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

#3

thanks for the help.

I see that whitelist is already there for start projects, I assume that I don’t have to additionally install it, right?


#4

Depending on what you’re working you will also need to include appropriate HTML security meta tag. For example Google maps will not work without them: http://www.gajotres.net/whitelist-external-resources-and-api-calls-ionic-framework/


#5

What would be the best place to put those android codes in my index.html?


#6

Are you talking about meta tag?


#7

this permission codes,


#8

Those goes into AndroidManifest.xml file, you can find it here:

PROJECT_FOLDER\platforms\android\AndroidManifest.xml

#9

oh… it seems like its already there. I guess latest version has integrated it.