triniwiz / nativescript-downloader

Apache License 2.0
32 stars 18 forks source link

Cannot download using a local secured server (with a local issued SSL certificate) #41

Open hgc2002 opened 4 years ago

hgc2002 commented 4 years ago

I'm using a local test server. It has an SSL certificate, but made locally, so it's not really "good", actually, but accepted if you omit that in your browser, manually. But in NS the download is canceled because of this.

Using your sample code and only changing the url to my local HTTPS server, the problem comes up.

Here is the error message: 'canceled'

So, this is easy: Is there any way to avoid this error using a simple apache httpd server with local created SSL certificate ??. I mean, is there any way to configure it to accept any certificate without verifying it ??

Thanks for your help.

Version info:

iOS: 13.3 (simulator iPhone 8) (Android not tested yet) tns: 6.2.2 tns-core-modules@6.3.1 tns-ios: 6.2.0 nativescript-downloader@2.1.5

triniwiz commented 4 years ago

For iOS you can do this

hgc2002 commented 4 years ago

Thanks! But for Android ???

workaround: use httpModule.getFile It's not exactly the same, but works.