pastesite.com New paste

Share a HAR file without the session cookies

By · Published 2026-12-01 · reviewed 2026-11-24 · 3 min read

AI-assisted article. Reviewed by Codebuff automated editorial review on 2026-11-24. Examples are illustrative, not real user data.

A HAR file is what a browser's network panel exports: every request the page made, with headers, cookies, timings and often the response body. That completeness is why it reproduces a bug so well, and why sending the whole file to a public thread can hand over a live session. The useful part is usually one request and its timing; the rest is identity and noise. Export the file, then reduce it to that request before anyone else sees it.

What does a HAR file capture besides the failing request?

A HAR is JSON, not a screenshot of one call. It records each request's URL, method, status, request and response headers, cookies, query string, timing breakdown and, depending on the export, the response body. A single page load can produce dozens of entries, including analytics, fonts and authenticated API calls that have nothing to do with the bug.

The entry you need is usually the one with the failing status or the long duration. Keep that entry and the page action that triggered it; the surrounding entries mostly reveal where the person works and what else they were doing.

Which fields carry a session?

Cookies and authorization headers are the first priority. A `Cookie` request header can contain a session id, and an `Authorization: Bearer ...` header is the credential itself. Query strings can carry an API key or a signed URL, and response headers can set a new cookie. Redact the value but keep the header name, because the reader needs to know the request was authenticated.

Also check `Set-Cookie` on the response, `Referer` (which can include a private URL), and any custom header such as `X-Api-Key`. Removing the whole entry is not necessary; replacing the value preserves the shape of the request.

{
  "log": {
    "entries": [
      {
        "request": {
          "method": "GET",
          "url": "https://api.example.test/orders?api_key=sk_live_REAL",
          "headers": [
            { "name": "Cookie", "value": "session=abc123" },
            { "name": "Authorization", "value": "Bearer eyJhbGciOi..." }
          ]
        },
        "response": { "status": 500 }
      }
    ]
  }
}

# Same entry, values replaced
"url": "https://api.example.test/orders?api_key=REDACTED",
"headers": [
  { "name": "Cookie", "value": "session=REDACTED" },
  { "name": "Authorization", "value": "Bearer REDACTED" }
]

Should you keep the response body?

A response body can explain the failure, but it can also contain other people's data or a fresh token. If the body is the evidence, keep the smallest fragment that shows the error and replace identifiers. If the status and headers are enough, drop the body entirely and say you did.

Trim the entry list too. A HAR viewer can delete every other request, which makes the file small enough to read and removes unrelated authenticated calls. Keep the page URL and the action that produced the failing request in the message, because a HAR alone does not say what the user clicked.

What should you say about the redactions?

State that the file is redacted and list the kinds of values you replaced: session cookie, bearer token, query key, account id. That tells the reader the request shape is real while the values are not, and it prevents them from testing a placeholder as if it were live.

If the bug needs the real value to reproduce, do not put it in a public paste. Send the file through an encrypted paste or a private channel, and rotate the credential if it was exposed. A HAR is a snapshot of a logged-in browser; treat it like one.

Sources and editorial review

Prepared with AI assistance and checked against the log, JSON and encrypted-paste pages at the reviewed revision: the HAR entry structure, cookie and authorization fields, query-string keys, response bodies, trimming entries and the redaction statement. The example host and credential values are fabricated.