Browse Source

Fixed https redirect for Firefox

master
Igor Zhukov 10 years ago
parent
commit
c08a227f60
  1. 6
      app/js/controllers.js

6
app/js/controllers.js

@ -20,7 +20,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
if (location.protocol == 'http:' && if (location.protocol == 'http:' &&
!Config.Modes.http && !Config.Modes.http &&
Config.App.domains.indexOf(location.hostname) != -1) { Config.App.domains.indexOf(location.hostname) != -1) {
location.protocol = 'https:'; location.href = location.href.replace(/^http:/, 'https:');
return; return;
} }
$scope.showWelcome = true; $scope.showWelcome = true;
@ -43,7 +43,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
if (location.protocol == 'http:' && if (location.protocol == 'http:' &&
!Config.Modes.http && !Config.Modes.http &&
Config.App.domains.indexOf(location.hostname) != -1) { Config.App.domains.indexOf(location.hostname) != -1) {
location.protocol = 'https:'; location.href = location.href.replace(/^http:/, 'https:');
} }
}); });
var options = {dcID: 2, createNetworker: true}, var options = {dcID: 2, createNetworker: true},
@ -638,7 +638,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
if (location.protocol == 'http:' && if (location.protocol == 'http:' &&
!Config.Modes.http && !Config.Modes.http &&
Config.App.domains.indexOf(location.hostname) != -1) { Config.App.domains.indexOf(location.hostname) != -1) {
location.protocol = 'https:'; location.href = location.href.replace(/^http:/, 'https:');
} else { } else {
location.hash = '/login'; location.hash = '/login';
AppRuntimeManager.reload(); AppRuntimeManager.reload();

Loading…
Cancel
Save