mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-01-12 16:07:59 +00:00
fix proxy() to not proxy local URLs
This commit is contained in:
parent
f902055293
commit
2ae0996c2e
@ -665,7 +665,8 @@ function htmlFormatMsg(msg, mentions) {
|
||||
|
||||
function proxyURL(url) {
|
||||
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
|
||||
if (proxyOpt === 'ssl-proxy-my-addr') {
|
||||
url = 'https://ssl-proxy.my-addr.org/myaddrproxy.php/' +
|
||||
|
Loading…
Reference in New Issue
Block a user