Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enabling cors from nativescript-angular app #462

Open
mu250234 opened this issue Sep 6, 2017 · 2 comments
Open

enabling cors from nativescript-angular app #462

mu250234 opened this issue Sep 6, 2017 · 2 comments

Comments

@mu250234
Copy link

mu250234 commented Sep 6, 2017

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.

@fourctv
Copy link
Contributor

fourctv commented Sep 6, 2017

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.

@kokosky93
Copy link

How to do this on for Android?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants