1
0
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:
Ilya Kreymer 2017-07-21 11:49:28 -07:00
parent b2c635ac79
commit 64d05aca45

View File

@ -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);
}
}