keycloak auth/admin/master/console/whoami 401 (Unauthorized)

Due to some organizational restrictions my DNS server does a basic auth credentials check before passing the request to the server. this is to avoid unwanted requests reaching the application server.

For public section of my application to load properly, I have added Auth-Headers to my request in application layer so that only first/new hit demands credentials

however I am not able to login and see the private section of website.

I have a keycloak running in a docker container and though it works fine when I am inside the organizational network, however from outside the network I get 401 (Unauthorized) on auth/admin/master/console/whoami request.

I can see that for this request substitutes the Authorization-headers with the token for keycloak authentication, as a result this request is blocked by the DNS and never reaches my server.

How can I fix this issue? How can I tell keycloak to send another authorization header along with its header in its requests. like here https://stackoverflow.com/questions/29282578/multiple-http-authorization-headers (if that is indeed a solution?)