Browse Source

make websync reqests to i2p server

master
R4SAS 6 years ago
parent
commit
ca185f11d2
  1. 4
      app/js/services.js
  2. 11
      nginx-server.conf.example

4
app/js/services.js

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

11
nginx-server.conf.example

@ -29,4 +29,15 @@ server {
rewrite ^/web/(.*)/(.*) /$2 break; rewrite ^/web/(.*)/(.*) /$2 break;
proxy_pass https://$1.web.telegram.org; 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;
}
} }

Loading…
Cancel
Save