From c08a227f60c214903af8ea4ee9c00b76a7b06f1e Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Tue, 16 Dec 2014 13:37:08 -0800 Subject: [PATCH] Fixed https redirect for Firefox --- app/js/controllers.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/js/controllers.js b/app/js/controllers.js index ab471d6f..0ef52ec8 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -20,7 +20,7 @@ angular.module('myApp.controllers', ['myApp.i18n']) if (location.protocol == 'http:' && !Config.Modes.http && Config.App.domains.indexOf(location.hostname) != -1) { - location.protocol = 'https:'; + location.href = location.href.replace(/^http:/, 'https:'); return; } $scope.showWelcome = true; @@ -43,7 +43,7 @@ angular.module('myApp.controllers', ['myApp.i18n']) if (location.protocol == 'http:' && !Config.Modes.http && Config.App.domains.indexOf(location.hostname) != -1) { - location.protocol = 'https:'; + location.href = location.href.replace(/^http:/, 'https:'); } }); var options = {dcID: 2, createNetworker: true}, @@ -638,7 +638,7 @@ angular.module('myApp.controllers', ['myApp.i18n']) if (location.protocol == 'http:' && !Config.Modes.http && Config.App.domains.indexOf(location.hostname) != -1) { - location.protocol = 'https:'; + location.href = location.href.replace(/^http:/, 'https:'); } else { location.hash = '/login'; AppRuntimeManager.reload();