Fix proxied urls not unproxifying (regression 1116b05f)

Technically this code has been wrong for a long time, but it only
manifest now. It seems that the equivalent code in translate module
was fixed when that code was extracted into a separate repo
This commit is contained in:
Adomas Venčkauskas 2022-11-10 12:45:31 +02:00
parent 249fbfad15
commit 26f1d6125b

View file

@ -458,7 +458,7 @@ Zotero.Proxy.prototype.toProper = function(m) {
m = match;
}
}
let protocol = this.scheme.indexOf('https') == -1 ? 'http://' : 'https://';
let protocol = m[0].indexOf('https') == -1 ? 'http://' : 'https://';
if(this.multiHost) {
var properURL = protocol+m[this.parameters.indexOf("%h")+1]+"/";
} else {