mirror of
https://github.com/webrecorder/browsertrix-crawler.git
synced 2025-10-19 14:33:17 +00:00
fix cookie not being passed to replay regression
- for now, add x-wabac-preset-cookie header for quick fix (same as AWP) - more permanent fix will involve fixing warcio.js indexing to include the header - fix replay of X captures and other pages requiring cookies
This commit is contained in:
parent
edbb1c1300
commit
31876855ad
1 changed files with 7 additions and 0 deletions
|
@ -1751,6 +1751,13 @@ function createResponse(
|
||||||
|
|
||||||
const httpHeaders = reqresp.getResponseHeadersDict(reqresp.payload.length);
|
const httpHeaders = reqresp.getResponseHeadersDict(reqresp.payload.length);
|
||||||
|
|
||||||
|
const cookie =
|
||||||
|
reqresp.requestHeaders &&
|
||||||
|
(reqresp.requestHeaders["cookie"] || reqresp.requestHeaders["Cookie"]);
|
||||||
|
if (cookie) {
|
||||||
|
httpHeaders["x-wabac-preset-cookie"] = cookie;
|
||||||
|
}
|
||||||
|
|
||||||
const warcHeaders: Record<string, string> = {
|
const warcHeaders: Record<string, string> = {
|
||||||
"WARC-Page-ID": pageid,
|
"WARC-Page-ID": pageid,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue