I would like to know if there is a way to intercept the image loading requests of a browser and add some request headers expected by the server.
The actual scenario is this: the web app sends an XHR to the server and completes an authentication handshake. All the subsequent requests have to include the auth header. The images are broken because the browser does not send the headers for the image requests.