diff --git a/src/util/recorder.ts b/src/util/recorder.ts index be36cc3b..a485b988 100644 --- a/src/util/recorder.ts +++ b/src/util/recorder.ts @@ -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 = { "WARC-Page-ID": pageid, };