{N} and localhost
makeAdance opened this issue · comments
How can I achieve that a http-request to http://localhost:3000/example
is working?
I assume the problem occurs because you make no request to https !?!
After npm run ios
and the request I get the following error:
App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.
CONSOLE ERROR file:///app/tns_modules/@angular/core/./bundles/core.umd.js:1052:24: ERROR Error: Uncaught (in promise): Response with status: 200 for URL: null
I would like to know the best/correct approach to solve that problem. (both for ios/android)
Thanks.
I would like to friendly remind you that the git issue tracking on this repository is focused solely on issues with the seed, the tooling tasks or dependency conflicts.
This is not meant to and does not operate as a forum board for support on your NativeScript projects.
Those appropriate channels are:
A simple Google search of your error would provide 61,000+ results on relative topics that point out the exact procedure to resolving this issue.
The first Google result is this StackOverflow issue: https://stackoverflow.com/questions/31254725/transport-security-has-blocked-a-cleartext-http
No worries, just want to keep the issue tracking clean and focused as others are tracing problems they encounter with the seed.
You should only need this:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
in your info.plist
and possibly remove and re-add the iOS platform. Android may not have the same security restriction out of the gate.