angular-seed-advanced icon indicating copy to clipboard operation
angular-seed-advanced copied to clipboard

enabling cors from nativescript-angular app

Open mu250234 opened this issue 6 years ago • 2 comments

Hi, I have an issue with cors (cross domain )request . I need to fetch data from rest api which are deployed on other domain from my nativescript angular app. Is there any way to enable cors in nativescript app ? (like we can use "Allow-Control-Allow-Origin: *" plugin for Chrome) . Please don't suggest me to enable cors from server side as I don't have permissions.

mu250234 avatar Sep 06 '17 14:09 mu250234

For iOS you need to add the following to /nativescript/App_Resources/iOS/info.plist:

	<key>NSAppTransportSecurity</key>
	<dict>
		<!--Include to allow all connections (DANGER)-->
		<key>NSAllowsArbitraryLoads</key>
		<true/>
	</dict>

Not sure what is the similar setting for Android.

fourctv avatar Sep 06 '17 17:09 fourctv

How to do this on for Android?

kokosky93 avatar Dec 07 '19 22:12 kokosky93