Adding customRequestheader based on host name in the request

Hi all,

I would like to add customerequestheader , but header value should be host of the each http request , so that i can route the request based on this header value to respective namespace in backend .
for example if am accessing . , My customerequestheader value should also be . This is for the CI, where my hostnames keep changing with namespace, according hostname i have to route to the respective backend namespace

kind: Middleware
name: add-header
x-request-downstream: "#Here i want hostname from client's request "

How can i achieve that ,Can someone please help me .

It seems something like this has been requested years ago (link), but it’s still not available. Many similar issues on Github.

Alternatively you can check Traefik Plugins (link).

Thank you for the reply , Can you give me a reference to plugin which I can use for this feature ?

No, you need to check yourself.