1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-24 23:26:50 +02:00

Android: Fixes #4439: Add option to disable TLS validation and allow self-signed certificates for WebDAV/NextCloud (#4742)

This commit is contained in:
Roman Musin
2021-04-25 09:50:52 +01:00
committed by GitHub
parent 3235f58f5a
commit a4854fcde8
17 changed files with 186 additions and 9 deletions

View File

@ -88,6 +88,7 @@ function shimInit() {
const doFetchBlob = () => {
return RNFetchBlob.config({
path: localFilePath,
trusty: options.ignoreTlsErrors,
}).fetch(method, url, headers);
};
@ -123,7 +124,9 @@ function shimInit() {
const method = options.method ? options.method : 'POST';
try {
const response = await RNFetchBlob.fetch(method, url, headers, RNFetchBlob.wrap(options.path));
const response = await RNFetchBlob.config({
trusty: options.ignoreTlsErrors,
}).fetch(method, url, headers, RNFetchBlob.wrap(options.path));
// Returns an object that's roughtly compatible with a standard Response object
return {