Blocking issues workaround
Added force no-ssl version Added no-redirect version
This commit is contained in:
parent
0a66601444
commit
5c66fe0ef1
@ -18,6 +18,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
||||
return;
|
||||
}
|
||||
if (location.protocol == 'http:' &&
|
||||
!Config.Modes.http &&
|
||||
Config.App.domains.indexOf(location.hostname) != -1) {
|
||||
location.protocol = 'https:';
|
||||
return;
|
||||
@ -40,6 +41,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
||||
return;
|
||||
}
|
||||
if (location.protocol == 'http:' &&
|
||||
!Config.Modes.http &&
|
||||
Config.App.domains.indexOf(location.hostname) != -1) {
|
||||
location.protocol = 'https:';
|
||||
}
|
||||
@ -633,6 +635,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
||||
if (error.code == 401) {
|
||||
MtpApiManager.logOut()['finally'](function () {
|
||||
if (location.protocol == 'http:' &&
|
||||
!Config.Modes.http &&
|
||||
Config.App.domains.indexOf(location.hostname) != -1) {
|
||||
location.protocol = 'https:';
|
||||
} else {
|
||||
|
@ -28,7 +28,8 @@ Config.App = {
|
||||
Config.Modes = {
|
||||
test: location.search.indexOf('test=1') > 0,
|
||||
debug: location.search.indexOf('debug=1') > 0,
|
||||
ssl: location.search.indexOf('ssl=1') > 0 || location.protocol == 'https:',
|
||||
http: location.search.indexOf('http=1') > 0,
|
||||
ssl: location.search.indexOf('ssl=1') > 0 || location.protocol == 'https:' && location.search.indexOf('ssl=0') == -1,
|
||||
nacl: location.search.indexOf('nacl=0')== -1,
|
||||
webcrypto: location.search.indexOf('webcrypto=0')== -1,
|
||||
packed: location.protocol == 'app:' || location.protocol == 'chrome-extension:',
|
||||
|
@ -4026,6 +4026,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
||||
function start () {
|
||||
if (started ||
|
||||
location.protocol != 'http:' ||
|
||||
Config.Modes.http ||
|
||||
Config.App.domains.indexOf(location.hostname) == -1) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user