Skip to content

Commit 3187685

Browse files
authored
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
1 parent edbb1c1 commit 3187685

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/util/recorder.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1751,6 +1751,13 @@ function createResponse(
17511751

17521752
const httpHeaders = reqresp.getResponseHeadersDict(reqresp.payload.length);
17531753

1754+
const cookie =
1755+
reqresp.requestHeaders &&
1756+
(reqresp.requestHeaders["cookie"] || reqresp.requestHeaders["Cookie"]);
1757+
if (cookie) {
1758+
httpHeaders["x-wabac-preset-cookie"] = cookie;
1759+
}
1760+
17541761
const warcHeaders: Record<string, string> = {
17551762
"WARC-Page-ID": pageid,
17561763
};

0 commit comments

Comments
 (0)