Added ssl option to config to force HTTPS
This commit is contained in:
parent
0a74961cb8
commit
4c58d00f74
@ -27,6 +27,7 @@ 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:',
|
||||
packed: location.protocol == 'app:' || location.protocol == 'chrome-extension:',
|
||||
ios_standalone: window.navigator.standalone && navigator.userAgent.match(/iOS|iPhone|iPad/),
|
||||
chrome_packed: window.chrome && chrome.app && chrome.app.window && true || false
|
||||
|
@ -9,7 +9,7 @@ angular.module('izhukov.mtproto', ['izhukov.utils'])
|
||||
|
||||
.factory('MtpDcConfigurator', function () {
|
||||
var dcOptions = Config.Modes.test
|
||||
? (location.protocol == 'https:'
|
||||
? (Config.Modes.ssl
|
||||
? [
|
||||
{id: 1, url: 'https://pluto.web.telegram.org/apiw_test1'},
|
||||
{id: 2, url: 'https://venus.web.telegram.org/apiw_test1'},
|
||||
@ -20,7 +20,7 @@ angular.module('izhukov.mtproto', ['izhukov.utils'])
|
||||
{id: 2, url: 'http://149.154.167.40/apiw1'},
|
||||
{id: 3, url: 'http://174.140.142.5/apiw1'}
|
||||
])
|
||||
: (location.protocol == 'https:'
|
||||
: (Config.Modes.ssl
|
||||
? [
|
||||
{id: 1, url: 'https://pluto.web.telegram.org/apiw1'},
|
||||
{id: 2, url: 'https://venus.web.telegram.org/apiw1'},
|
||||
|
Loading…
Reference in New Issue
Block a user