Adding header on login POST request

Hey everyone,

i’m looking for a way to add a custom header preferably on all requests that are sent to matomo, or at least on POST requests. When i try to login to matomo, the POST request will fail as the web server in front of matomo expects the custom header.

i figured i will probably have to edit one of the .js or .php files but i don’t know where this request for the login is constructed…

Maybe someone can guide me in the right direction.

Thanks.