Hi,
I’m trying to record a browsing session and replay the page offline, but I’m stuck with a JS-based authorization flow.
The page loads a resource like:
The server initially responds with 403 Forbidden.
When the browser-side JavaScript detects the 403, it triggers an OPTIONS (or similar) request that performs some authorization logic.
In response, it receives a token, and then the page re-requests the resource as:
https://example.com/file.svg?tokenid=…
This second request returns 200 OK and the SVG image is displayed correctly online in browser.
However, when I record the session and replay it offline, I only ever see the first 403 response, and the image never appears.
Question:
Is there any known way to:
properly capture this kind of JS-driven auth/token flow so it works offline, or
rewrite / detach / pre-resolve the tokenized request so the image can be shown in offline replay, or
filter / ignore the initial 403 and force replay to use the authenticated request?
Any hints about tools, browser tricks would be appreciated.