onBeforeResponse that is supposed to check the response content type and if it's HTML, modify the body to add some stuff in the <head> tag (think about a CSRF token for example). To do so, I'm using the hook onBeforeRequest. This hook gives me access to an event param and a response param. The response is empty, no body, no headers, nothing. If my hook just returns the response that was given, my site breaks.