Use another header than Authorization for basic auth

Hi there,

I have an api using basic auth behind Traefik and i would like to add an authentication at Traefik level.
I succeeded in configuring basic auth at Traefik level using the basic auth middleware, but i want the credentials for authenticating at Traefik level to be different than at app level (some kind of MFA) and i only have one possible Authorization header to hold them both.
The solution i was hoping from Traefik basic auth middleware is to be able to define a specific header to be used for authentication, but looking at the doc and the source code, it seems it's not possible at the moment.
I guess would have to be updated to get the authorization from a specific header.

Do you have any suggestion how i could achieve this?


1 Like