kfiroo / react-native-cached-image

CachedImage component for react-native
MIT License
940 stars 468 forks source link

Allow image download from Self-Signed SSL Server #66

Open markusguenther opened 7 years ago

markusguenther commented 7 years ago

As the library uses react-native-fetch-blob for the download and by default, react-native-fetch-blob does NOT allow connection to unknown certification provider since it's dangerous.

It is not a suprise that cached image also not support that. But sometimes it is needed to accept also self signed stuff. To connect a server with self-signed certification, you need to add trusty to config for react-native-fetch-blob explicitly.

RNFetchBlob.config({
  trusty : true
})

The cached image actually just use the path property.

It is easy to add the trusty flag, but I would like to ask the community what they would like to have.

I would like to add a PR for that but first would like to ask you :D

kfiroo commented 7 years ago

@markusguenther I think we can add some customizability to the RNFetchBlob.config method.

I think it's best to wait for v1.4.0 with the PR, do you agree?

markusguenther commented 7 years ago

@kfiroo Ok sounds good. Fixed that for me actually, but I only need this pro the development time. In production this flag is not needed at all.