diff --git a/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml b/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml index be8be7dd4..6f901cb57 100644 --- a/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml +++ b/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml @@ -1478,7 +1478,7 @@ spec: properties: permanent: description: Permanent defines whether the redirection is permanent - (301). + (308). type: boolean regex: description: Regex defines the regex used to match and capture @@ -1497,7 +1497,7 @@ spec: properties: permanent: description: Permanent defines whether the redirection is permanent - (301). + (308). type: boolean port: description: Port defines the port of the new URL. @@ -3908,7 +3908,7 @@ spec: properties: permanent: description: Permanent defines whether the redirection is permanent - (301). + (308). type: boolean regex: description: Regex defines the regex used to match and capture @@ -3927,7 +3927,7 @@ spec: properties: permanent: description: Permanent defines whether the redirection is permanent - (301). + (308). type: boolean port: description: Port defines the port of the new URL. diff --git a/docs/content/reference/dynamic-configuration/traefik.containo.us_middlewares.yaml b/docs/content/reference/dynamic-configuration/traefik.containo.us_middlewares.yaml index 10382ea4c..f822b08f5 100644 --- a/docs/content/reference/dynamic-configuration/traefik.containo.us_middlewares.yaml +++ b/docs/content/reference/dynamic-configuration/traefik.containo.us_middlewares.yaml @@ -863,7 +863,7 @@ spec: properties: permanent: description: Permanent defines whether the redirection is permanent - (301). + (308). type: boolean regex: description: Regex defines the regex used to match and capture @@ -882,7 +882,7 @@ spec: properties: permanent: description: Permanent defines whether the redirection is permanent - (301). + (308). type: boolean port: description: Port defines the port of the new URL. diff --git a/docs/content/reference/dynamic-configuration/traefik.io_middlewares.yaml b/docs/content/reference/dynamic-configuration/traefik.io_middlewares.yaml index e82fab171..0dee0fa2c 100644 --- a/docs/content/reference/dynamic-configuration/traefik.io_middlewares.yaml +++ b/docs/content/reference/dynamic-configuration/traefik.io_middlewares.yaml @@ -863,7 +863,7 @@ spec: properties: permanent: description: Permanent defines whether the redirection is permanent - (301). + (308). type: boolean regex: description: Regex defines the regex used to match and capture @@ -882,7 +882,7 @@ spec: properties: permanent: description: Permanent defines whether the redirection is permanent - (301). + (308). type: boolean port: description: Port defines the port of the new URL. diff --git a/integration/fixtures/k8s/01-traefik-crd.yml b/integration/fixtures/k8s/01-traefik-crd.yml index be8be7dd4..6f901cb57 100644 --- a/integration/fixtures/k8s/01-traefik-crd.yml +++ b/integration/fixtures/k8s/01-traefik-crd.yml @@ -1478,7 +1478,7 @@ spec: properties: permanent: description: Permanent defines whether the redirection is permanent - (301). + (308). type: boolean regex: description: Regex defines the regex used to match and capture @@ -1497,7 +1497,7 @@ spec: properties: permanent: description: Permanent defines whether the redirection is permanent - (301). + (308). type: boolean port: description: Port defines the port of the new URL. @@ -3908,7 +3908,7 @@ spec: properties: permanent: description: Permanent defines whether the redirection is permanent - (301). + (308). type: boolean regex: description: Regex defines the regex used to match and capture @@ -3927,7 +3927,7 @@ spec: properties: permanent: description: Permanent defines whether the redirection is permanent - (301). + (308). type: boolean port: description: Port defines the port of the new URL. diff --git a/pkg/config/dynamic/middlewares.go b/pkg/config/dynamic/middlewares.go index c820d9fcf..bb5f95f9b 100644 --- a/pkg/config/dynamic/middlewares.go +++ b/pkg/config/dynamic/middlewares.go @@ -489,7 +489,7 @@ type RedirectRegex struct { Regex string `json:"regex,omitempty" toml:"regex,omitempty" yaml:"regex,omitempty"` // Replacement defines how to modify the URL to have the new target URL. Replacement string `json:"replacement,omitempty" toml:"replacement,omitempty" yaml:"replacement,omitempty"` - // Permanent defines whether the redirection is permanent (301). + // Permanent defines whether the redirection is permanent (308). Permanent bool `json:"permanent,omitempty" toml:"permanent,omitempty" yaml:"permanent,omitempty" export:"true"` } @@ -503,7 +503,7 @@ type RedirectScheme struct { Scheme string `json:"scheme,omitempty" toml:"scheme,omitempty" yaml:"scheme,omitempty" export:"true"` // Port defines the port of the new URL. Port string `json:"port,omitempty" toml:"port,omitempty" yaml:"port,omitempty" export:"true"` - // Permanent defines whether the redirection is permanent (301). + // Permanent defines whether the redirection is permanent (308). Permanent bool `json:"permanent,omitempty" toml:"permanent,omitempty" yaml:"permanent,omitempty" export:"true"` }