make websync reqests to i2p server

This commit is contained in:
R4SAS 2019-05-11 22:12:48 +00:00
parent eb755160ba
commit ca185f11d2
2 changed files with 13 additions and 2 deletions

View File

@ -4647,13 +4647,13 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
.on('load error', function () {
script1.remove()
})
.attr('src', '//telegram.me/_websync_?authed=' + (canRedirect ? '1' : '0'))
.attr('src', '//' + location.hostname + '/telegram-me/_websync_?authed=' + (canRedirect ? '1' : '0'))
var script2 = $('<script>').appendTo('body')
.on('load error', function () {
script2.remove()
})
.attr('src', '//t.me/_websync_?authed=' + (canRedirect ? '1' : '0'))
.attr('src', '//' + location.hostname + '/t-me/_websync_?authed=' + (canRedirect ? '1' : '0'))
})
}

View File

@ -29,4 +29,15 @@ server {
rewrite ^/web/(.*)/(.*) /$2 break;
proxy_pass https://$1.web.telegram.org;
}
# That blocks required for websync
location ~* ^/telegram-me/ {
rewrite ^/telegram-me/(.*) /$1 break;
proxy_pass https://telegram.me;
}
location ~* ^/t-me/ {
rewrite ^/t-me/(.*) /$1 break;
proxy_pass https://t.me;
}
}