Skip to content

Commit

Permalink
Set rule syntax v3 for entrypoint redirections explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
HalloTschuess committed May 6, 2024
1 parent 15973f5 commit 5027714
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pkg/provider/traefik/fixtures/redirection.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"redirect-web-to-websecure"
],
"service": "noop@internal",
"rule": "HostRegexp(`^.+$`)"
"rule": "HostRegexp(`^.+$`)",
"ruleSyntax": "v3"
}
},
"services": {
Expand Down
3 changes: 2 additions & 1 deletion pkg/provider/traefik/fixtures/redirection_port.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"redirect-web-to-443"
],
"service": "noop@internal",
"rule": "HostRegexp(`^.+$`)"
"rule": "HostRegexp(`^.+$`)",
"ruleSyntax": "v3"
}
},
"services": {
Expand Down
3 changes: 2 additions & 1 deletion pkg/provider/traefik/fixtures/redirection_with_protocol.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"redirect-web-to-websecure"
],
"service": "noop@internal",
"rule": "HostRegexp(`^.+$`)"
"rule": "HostRegexp(`^.+$`)",
"ruleSyntax": "v3"
}
},
"services": {
Expand Down
1 change: 1 addition & 0 deletions pkg/provider/traefik/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 5027714

Please sign in to comment.