Dear all,
I have the following in my dynamic.yml
:
middlewares:
dashboard-auth:
basicAuth:
users:
- "administrator:*************"
secure-headers:
headers:
frameDeny: true
and the following in my docker-compose.yml
:
- "traefik.http.routers.dashboardRouter.middlewares=dashboard-auth@file"
- "traefik.http.routers.dashboardRouter.middlewares=secure-headers@file"
I noticed that if I have both lines above in docker-compose.yml
, then the headers are applied correctly, but dashboard-auth
doesn't get executed, i.e. no user name/password are asked to enter the dashboard. If I remove the secure-headers
line from docker-compose.yml
, the authentication works normally.
I guess it is because the secure-headers
middleware overwrites the headers added by dashboard-auth
. What is the proper way to chain these middlewares?
Thanks in advance for any pointers in the right direction!