Intercepting http resource request to modify headers

96 Views Asked by At

I have a use case where I want to intercept all http resource request and modify the request headers. Intercepting XMLHttpRequest is fine but I need to intercept resource requests from my JS code. Has anyone ever done that?

Ex : GET https://something.com/demo.js

While requesting for this resource I want to intercept the request and add authentication header information.

0

There are 0 best solutions below