mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
All: Fixes #343, Fixes #191: Added options to ignore TLS cert errors to allow self-signed certificates on desktop and CLI
This commit is contained in:
parent
617ed42d8c
commit
aa7da784fc
@ -309,6 +309,11 @@ class BaseApplication {
|
||||
time.setTimeFormat(Setting.value('timeFormat'));
|
||||
}
|
||||
|
||||
if ((action.type == 'SETTING_UPDATE_ONE' && action.key == 'net.ignoreTlsErrors') || (action.type == 'SETTING_UPDATE_ALL')) {
|
||||
// https://stackoverflow.com/questions/20082893/unable-to-verify-leaf-signature
|
||||
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = Setting.value('net.ignoreTlsErrors') ? '0' : '1';
|
||||
}
|
||||
|
||||
if ((action.type == 'SETTING_UPDATE_ONE' && (action.key.indexOf('encryption.') === 0)) || (action.type == 'SETTING_UPDATE_ALL')) {
|
||||
if (this.hasGui()) {
|
||||
await EncryptionService.instance().loadMasterKeysFromSettings();
|
||||
|
@ -149,6 +149,8 @@ class Setting extends BaseModel {
|
||||
'sync.5.context': { value: '', type: Setting.TYPE_STRING, public: false },
|
||||
'sync.6.context': { value: '', type: Setting.TYPE_STRING, public: false },
|
||||
'sync.7.context': { value: '', type: Setting.TYPE_STRING, public: false },
|
||||
|
||||
'net.ignoreTlsErrors': { value: false, type: Setting.TYPE_BOOL, show: (settings) => { return [SyncTargetRegistry.nameToId('nextcloud'), SyncTargetRegistry.nameToId('webdav')].indexOf(settings['sync.target']) >= 0 }, public: true, appTypes: ['desktop', 'cli'], label: () => _('Ignore TLS certificate errors') },
|
||||
};
|
||||
|
||||
return this.metadata_;
|
||||
|
@ -292,7 +292,6 @@ for (let portToTest = 41184; portToTest <= 41194; portToTest++) {
|
||||
}
|
||||
}
|
||||
</code></pre>
|
||||
<p>start from 41184, then ping it (using the /ping method below)</p>
|
||||
<p>The following methods are available:</p>
|
||||
<h3 id="get-ping">GET /ping</h3>
|
||||
<p>Tells whether the service is active or not. It should return "JoplinClipperServer" if it works.</p>
|
||||
|
@ -58,8 +58,6 @@ for (let portToTest = 41184; portToTest <= 41194; portToTest++) {
|
||||
}
|
||||
```
|
||||
|
||||
start from 41184, then ping it (using the /ping method below)
|
||||
|
||||
The following methods are available:
|
||||
|
||||
### GET /ping
|
||||
|
Loading…
Reference in New Issue
Block a user