benjreinhart / react-native-aws3

Pure JavaScript React Native library for uploading to AWS S3
MIT License
399 stars 151 forks source link

Remove https from bucket url to fix issue HTTP load failed (kCFStreamErrorDomainSSL, -9843 on iOS devices. #41

Closed JeffersonFilho closed 7 years ago

JeffersonFilho commented 7 years ago

Hello,

This will fix the issue with the 'NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843)' when trying to upload an image/video to your amazon bucket on iOS devices.

You also need to add this into your info.plist on NSAppTransportSecurity

<key>amazonaws.com</key>
   <dict>
     <key>NSExceptionAllowsInsecureHTTPLoads</key>
      <true/>
   </dict>
benjreinhart commented 7 years ago

Hey there, thanks for contributing! However, this hasn't been an issue for me or anyone else that I know of, so I'm not sure if this is actually solving any real problem that isn't specific to your use case / environment. Could you provide any more information on why https doesn't work for you, and why it would be acceptable to use insecure http requests?

I don't want to send insecure requests nor did I know Amazon would even allow insecure requests (do they?). I'd much prefer to keep requests secure so I'm not going to accept this. If I see others also surfacing this as an actual issue that I'm just not aware of, I'd consider allowing an option to allow clients to opt in to insecure requests, but I wouldn't want it to be the default.

JeffersonFilho commented 7 years ago

Morning @benjreinhart this issue is related to this https://github.com/benjreinhart/react-native-aws3/issues/8 and I'm not sure either why it happens and how to fix it without doing what I did on the pull request.