mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
client rewrite: fix window.fetch override, create new Request object if url is rewritten
This commit is contained in:
parent
cec0db1bdd
commit
a8c0ff3c06
@ -846,7 +846,10 @@ var wombat_internal = function($wbwindow) {
|
||||
if (typeof(input) === "string") {
|
||||
input = rewrite_url(input);
|
||||
} else if (typeof(input) === "object" && input.url) {
|
||||
input.url = rewrite_url(input.url);
|
||||
var new_url = rewrite_url(input.url);
|
||||
if (new_url != input.url) {
|
||||
input = new Request(new_url, input);
|
||||
}
|
||||
}
|
||||
|
||||
return orig_fetch.call(this, input, init);
|
||||
|
Loading…
x
Reference in New Issue
Block a user