summaryrefslogtreecommitdiff
path: root/www/js/LoginCtrl.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/LoginCtrl.js')
-rw-r--r--www/js/LoginCtrl.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/www/js/LoginCtrl.js b/www/js/LoginCtrl.js
index d7548258..fc63ff06 100644
--- a/www/js/LoginCtrl.js
+++ b/www/js/LoginCtrl.js
@@ -582,6 +582,27 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r
if ($rootScope.platformOS != 'desktop') {
+ if ($scope.loginData.isUseBasicAuth) {
+ debug ("Cordova HTTP: configuring basic auth");
+ cordova.plugin.http.useBasicAuth($scope.loginData.basicAuthUser, $scope.loginData.basicAuthPassword);
+ }
+
+ if (!$scope.loginData.enableStrictSSL) {
+
+ //alert("Enabling insecure SSL");
+ log(">>>> Disabling strict SSL checking (turn off in Dev Options if you can't connect)");
+ cordova.plugin.http.setSSLCertMode('nocheck', function() {
+ debug('--> SSL is permissive, will allow any certs. Use at your own risk.');
+ }, function() {
+ console.log('-->Error setting SSL permissive');
+ });
+
+ } else {
+
+ log(">>>> Enabling strict SSL checking (turn off in Dev Options if you can't connect)");
+
+ }
+
if ($scope.loginData.saveToCloud) {
NVRDataModel.debug ("writing data to cloud");