Possible to get subdomain match for set in header

Hello

Is it possible to get the matched regex from HostRegexp() rule for using in customrequestheaders/customresponseheaders ?

For now, using labels in docker-compose :

traefik.http.routers.website.rule=HostRegexp(website.traefik.me, {subdomain:[a-z0-9-]+}.website.traefik.me)

Is it possible to do something like below ?
traefik.http.middlewares.tenant-middleware.headers.customresponseheaders.X-CST-HEADER=http.routers.website.rule.match.subdomain

Thank

I don't think that is possible, check this old post.

1 Like