From 08b278069d02fdcb87d0d67c22d91125a9ab1e83 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Tue, 29 Apr 2014 22:09:17 +0800 Subject: [PATCH] Fixed https redirect --- app/js/controllers.js | 4 ++-- app/partials/confirm_modal.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/js/controllers.js b/app/js/controllers.js index 84bd2f9b..502ef1f3 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -158,7 +158,7 @@ angular.module('myApp.controllers', []) case 'NETWORK_BAD_REQUEST': if (location.protocol == 'https:') { ErrorService.confirm({type: 'HTTPS_MIXED_FAIL'}).then(function () { - location = location.toString().replace('/^https:/', 'http:'); + location = location.toString().replace(/^https:/, 'http:'); }); error.handled = true; } @@ -386,7 +386,7 @@ angular.module('myApp.controllers', []) if (error.type == 'NETWORK_BAD_REQUEST') { if (location.protocol == 'https:') { ErrorService.confirm({type: 'HTTPS_MIXED_FAIL'}).then(function () { - location = location.toString().replace('/^https:/', 'http:'); + location = location.toString().replace(/^https:/, 'http:'); }); error.handled = true; } diff --git a/app/partials/confirm_modal.html b/app/partials/confirm_modal.html index 3a6efff9..20b0bb35 100644 --- a/app/partials/confirm_modal.html +++ b/app/partials/confirm_modal.html @@ -10,7 +10,7 @@ Are you sure? This can not be undone! Are you sure you want to log out all devices except for the current one? - Your browser does not support mixed content which is neccessary for MTProto support on https. Learn more →
+ Your browser does not support mixed content which is neccessary for MTProto support on https. Learn more »

Would you like use http-version instead?