mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 08:04:49 +01:00
client-side (wombat): for now, fetch() always includes credentials (needed for WR, maybe should be optional?)
This commit is contained in:
parent
b2c635ac79
commit
64d05aca45
@ -857,7 +857,7 @@ var _WBWombat = function($wbwindow, wbinfo) {
|
||||
|
||||
var orig_fetch = $wbwindow.fetch;
|
||||
|
||||
$wbwindow.fetch = function(input, init) {
|
||||
$wbwindow.fetch = function(input, init_opts) {
|
||||
if (typeof(input) === "string") {
|
||||
input = rewrite_url(input);
|
||||
} else if (typeof(input) === "object" && input.url) {
|
||||
@ -867,7 +867,10 @@ var _WBWombat = function($wbwindow, wbinfo) {
|
||||
}
|
||||
}
|
||||
|
||||
return orig_fetch.call(this, input, init);
|
||||
init_opts = init_opts || {};
|
||||
init_opts["credentials"] = "include";
|
||||
|
||||
return orig_fetch.call(this, input, init_opts);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user