We moved our API endpoint to another url. The API sends cors headers so it's accessible from other domains.
On the old URL, which also has a web server hosting content, I set up a router with two middlewares, a redirectRegex to the new URL and one with the headers set.
I also tried the chain middleware with the same result.
What did you expect to see?
The 301 redirect has the headers.
What did you see instead?
The 301 redirect has no extra headers.
The Traefik web interface shows everything working as it should. Headers are sent on URLs that do not trigger the regexredirect.
Output of traefik version: (What version of Traefik are you using?)
2.2.1
What is your environment & configuration (arguments, toml, provider, platform, ...)?
Do you want to request a feature or report a bug?
Bug
What did you do?
We moved our API endpoint to another url. The API sends cors headers so it's accessible from other domains.
On the old URL, which also has a web server hosting content, I set up a router with two middlewares, a redirectRegex to the new URL and one with the headers set.
I also tried the chain middleware with the same result.
What did you expect to see?
The 301 redirect has the headers.
What did you see instead?
The 301 redirect has no extra headers.
The Traefik web interface shows everything working as it should. Headers are sent on URLs that do not trigger the regexredirect.
Output of
traefik version
: (What version of Traefik are you using?)2.2.1
What is your environment & configuration (arguments, toml, provider, platform, ...)?