Browse Source

fix proxy() to not proxy local URLs

master
Simon Grim 9 years ago
parent
commit
2ae0996c2e
  1. 3
      js/twister_formatpost.js

3
js/twister_formatpost.js

@ -665,7 +665,8 @@ function htmlFormatMsg(msg, mentions) {
function proxyURL(url) { function proxyURL(url) {
var proxyOpt = $.Options.useProxy.val; var proxyOpt = $.Options.useProxy.val;
if (proxyOpt !== 'disable' && !$.Options.useProxyForImgOnly.val) { if (proxyOpt !== 'disable' && !$.Options.useProxyForImgOnly.val
&& url[0] !== '/' && url.indexOf(location.origin) !== 0) {
// proxy alternatives may be added to options page FIXME currently not; and we need more fresh proxies // proxy alternatives may be added to options page FIXME currently not; and we need more fresh proxies
if (proxyOpt === 'ssl-proxy-my-addr') { if (proxyOpt === 'ssl-proxy-my-addr') {
url = 'https://ssl-proxy.my-addr.org/myaddrproxy.php/' + url = 'https://ssl-proxy.my-addr.org/myaddrproxy.php/' +

Loading…
Cancel
Save