I am currently developing a Chrome extension. I just don't understand if I can change the response body in Chrome.
Example : A website runs XMLhttpRequest before example.com/is_logged_in.php. It returns 0. I want to make a script that automatically changes 0to 1. And not by changing the javascript that the call makes, but by changing the body of the response, so javascript considers what it received 1.
I know that you can change the response headers of chrome.webRequest , but I want to change the response body, not the response headers.
Currently, it is possible, by changing the hosts fileway example.com'redirection' on your own hosting. Then you create is_logged_in.phpand install the content in 1. The script then thinks the user is logged in. I checked it and it works. But now I want this in the Chrome extension, so it is more user friendly.
Can Chrome change the answer (the body, not its headers), and if so, how?
source
share