Merge pull request #6418 from duplicati/feature/fix-ngax-use-ssl-support

Fix ngax support --use-ssl
This commit is contained in:
Kenneth Skovhede
2025-07-15 19:38:59 +02:00
parent ed4e63760e
commit 1fcd854f2b
3 changed files with 9 additions and 10 deletions
@@ -232,6 +232,8 @@ backupApp.directive('backupEditUri', function(gettextCatalog) {
if (scope.Backend.Options[n].Name == 'use-ssl')
scope.SupportsSSL = true;
console.log('Backend changed to: ' + scope.Backend.Key, scope.SupportsSSL);
scope.TemplateUrl = EditUriBackendConfig.templates[scope.Backend.Key];
if (scope.TemplateUrl == null)
scope.TemplateUrl = EditUriBackendConfig.defaulttemplate;
@@ -266,16 +268,15 @@ backupApp.directive('backupEditUri', function(gettextCatalog) {
if (hasssl) {
scope.Backend = bk;
parts['--use-ssl'] = true;
parts['--use-ssl'] = 'true';
break;
}
}
}
scope.Username = parts['--auth-username'];
scope.Password = parts['--auth-password'];
scope.UseSSL = parts['--use-ssl'];
scope.UseSSL = AppUtils.parseBoolString(parts['--use-ssl']);
scope.Port = parts['server-port'];
scope.Server = parts['server-name'];
scope.Path = parts['server-path'];
@@ -26,9 +26,8 @@ backupApp.service('EditUriBackendConfig', function(AppService, AppUtils, SystemI
var opts = {};
self.merge_in_advanced_options(scope, opts, true);
var url = AppUtils.format('{0}{1}://{2}{3}/{4}{5}',
var url = AppUtils.format('{0}://{1}{2}/{3}{4}',
scope.Backend.Key,
(scope.SupportsSSL && scope.UseSSL) ? 's' : '',
scope.Server || '',
(scope.Port || '') == '' ? '' : ':' + scope.Port,
scope.Path || '',
@@ -50,6 +49,8 @@ backupApp.service('EditUriBackendConfig', function(AppService, AppUtils, SystemI
dict['auth-username'] = scope.Username;
if (includeUserPassword && scope.Password != null && scope.Password != '')
dict['auth-password'] = scope.Password;
if (scope.UseSSL)
dict['use-ssl'] = 'true';
if (!AppUtils.parse_extra_options(scope.AdvancedOptions, dict))
return false;
@@ -668,9 +668,8 @@ backupApp.service('EditUriBuiltins', function (AppService, AppUtils, SystemInfo,
EditUriBackendConfig.merge_in_advanced_options(scope, opts, true);
var url = AppUtils.format('{0}{1}://{2}/{3}{4}',
var url = AppUtils.format('{0}://{1}/{2}{3}',
scope.Backend.Key,
scope.UseSSL ? 's' : '',
scope.Server || '',
scope.Path || '',
AppUtils.encodeDictAsUrl(opts)
@@ -697,9 +696,8 @@ backupApp.service('EditUriBuiltins', function (AppService, AppUtils, SystemInfo,
}
EditUriBackendConfig.merge_in_advanced_options(scope, opts, false);
var url = AppUtils.format('{0}{1}://{2}{3}',
var url = AppUtils.format('{0}://{1}{2}',
scope.Backend.Key,
(scope.SupportsSSL && scope.UseSSL) ? 's' : '',
scope.Path || '',
AppUtils.encodeDictAsUrl(opts)
);
@@ -1104,7 +1102,6 @@ backupApp.service('EditUriBuiltins', function (AppService, AppUtils, SystemInfo,
});
};
EditUriBackendConfig.validaters['webdav'] = EditUriBackendConfig.validaters['webdav'];
EditUriBackendConfig.validaters['tahoe'] = EditUriBackendConfig.validaters['ssh'];
EditUriBackendConfig.validaters['pcloud'] = function (scope, continuation) {