diff --git a/pkg/provider/traefik/fixtures/redirection.json b/pkg/provider/traefik/fixtures/redirection.json index 73ae77db34..a62480281f 100644 --- a/pkg/provider/traefik/fixtures/redirection.json +++ b/pkg/provider/traefik/fixtures/redirection.json @@ -9,7 +9,8 @@ "redirect-web-to-websecure" ], "service": "noop@internal", - "rule": "HostRegexp(`^.+$`)" + "rule": "HostRegexp(`^.+$`)", + "ruleSyntax": "v3" } }, "services": { diff --git a/pkg/provider/traefik/fixtures/redirection_port.json b/pkg/provider/traefik/fixtures/redirection_port.json index a9e75438a9..05ef94a7e4 100644 --- a/pkg/provider/traefik/fixtures/redirection_port.json +++ b/pkg/provider/traefik/fixtures/redirection_port.json @@ -9,7 +9,8 @@ "redirect-web-to-443" ], "service": "noop@internal", - "rule": "HostRegexp(`^.+$`)" + "rule": "HostRegexp(`^.+$`)", + "ruleSyntax": "v3" } }, "services": { diff --git a/pkg/provider/traefik/fixtures/redirection_with_protocol.json b/pkg/provider/traefik/fixtures/redirection_with_protocol.json index 73ae77db34..a62480281f 100644 --- a/pkg/provider/traefik/fixtures/redirection_with_protocol.json +++ b/pkg/provider/traefik/fixtures/redirection_with_protocol.json @@ -9,7 +9,8 @@ "redirect-web-to-websecure" ], "service": "noop@internal", - "rule": "HostRegexp(`^.+$`)" + "rule": "HostRegexp(`^.+$`)", + "ruleSyntax": "v3" } }, "services": { diff --git a/pkg/provider/traefik/internal.go b/pkg/provider/traefik/internal.go index 7a78703d07..fbb9d4ca69 100644 --- a/pkg/provider/traefik/internal.go +++ b/pkg/provider/traefik/internal.go @@ -141,6 +141,7 @@ func (i *Provider) redirection(ctx context.Context, cfg *dynamic.Configuration) rt := &dynamic.Router{ Rule: "HostRegexp(`^.+$`)", + RuleSyntax: "v3", EntryPoints: []string{name}, Middlewares: []string{mdName}, Service: "noop@internal",