Skip to content

Rule 'HostRegexp({host:.+})' no longer works in Traefik v3 #275

Answered by ToshY
ToshY asked this question in Q&A
Discussion options

You must be logged in to vote

After a bit of digging in the docs, I've found the following section regarding "Rule syntax" which includes an example (luckily) with HostRegexp.

## Dynamic configuration
http:
  routers:
    Router-v3:
      rule: HostRegexp(`[a-z]+\\.traefik\\.com`)
      ruleSyntax: v3
    Router-v2:
      rule: HostRegexp(`{subdomain:[a-z]+}.traefik.com`)
      ruleSyntax: v2

So after seeing that, I tried HostRegexp(`.+`) instead, and that works.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ToshY
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant