mirror of
https://github.com/traefik/traefik.git
synced 2025-05-05 15:33:01 +00:00
Restrict regex validation of HTTP status codes for Ingress CRD resources
This commit is contained in:
parent
405be420c9
commit
bb8dfa568a
@ -1250,7 +1250,7 @@ spec:
|
||||
as ranges by separating two codes with a dash (500-599),
|
||||
or a combination of the two (404,418,500-599).
|
||||
items:
|
||||
pattern: ^([0-5][0-9]{2}[,-]?)+$
|
||||
pattern: ^([1-5][0-9]{2}[,-]?)+$
|
||||
type: string
|
||||
type: array
|
||||
statusRewrites:
|
||||
|
@ -481,7 +481,7 @@ spec:
|
||||
as ranges by separating two codes with a dash (500-599),
|
||||
or a combination of the two (404,418,500-599).
|
||||
items:
|
||||
pattern: ^([0-5][0-9]{2}[,-]?)+$
|
||||
pattern: ^([1-5][0-9]{2}[,-]?)+$
|
||||
type: string
|
||||
type: array
|
||||
statusRewrites:
|
||||
|
@ -1250,7 +1250,7 @@ spec:
|
||||
as ranges by separating two codes with a dash (500-599),
|
||||
or a combination of the two (404,418,500-599).
|
||||
items:
|
||||
pattern: ^([0-5][0-9]{2}[,-]?)+$
|
||||
pattern: ^([1-5][0-9]{2}[,-]?)+$
|
||||
type: string
|
||||
type: array
|
||||
statusRewrites:
|
||||
|
@ -67,7 +67,7 @@ type ErrorPage struct {
|
||||
// as multiple comma-separated numbers (500,502),
|
||||
// as ranges by separating two codes with a dash (500-599),
|
||||
// or a combination of the two (404,418,500-599).
|
||||
// +kubebuilder:validation:items:Pattern=`^([0-5][0-9]{2}[,-]?)+$`
|
||||
// +kubebuilder:validation:items:Pattern=`^([1-5][0-9]{2}[,-]?)+$`
|
||||
Status []string `json:"status,omitempty"`
|
||||
// StatusRewrites defines a mapping of status codes that should be returned instead of the original error status codes.
|
||||
// For example: "418": 404 or "410-418": 404
|
||||
|
Loading…
x
Reference in New Issue
Block a user