How to add an interceptor for JSON requests

Hi, I am doing a fork of the Dash repo and I’d like to create an interceptor that adds a header to all requests of the type “dash-update-component”, for authentication reasons. How can I go about it?