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:
Ilya Kreymer 2024-11-05 13:45:34 -08:00 committed by GitHub
parent edbb1c1300
commit 31876855ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1751,6 +1751,13 @@ function createResponse(
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> = {
"WARC-Page-ID": pageid,
};