Fix deny encoded characters
Co-authored-by: Kevin Pollet <pollet.kevin@gmail.com>
This commit is contained in:
parent
8e6ce08f33
commit
23788e90cb
21 changed files with 435 additions and 303 deletions
|
|
@ -231,7 +231,7 @@ func (i *Provider) entryPointModels(cfg *dynamic.Configuration) {
|
|||
}
|
||||
}
|
||||
|
||||
if len(ep.HTTP.Middlewares) == 0 && ep.HTTP.TLS == nil && defaultRuleSyntax == "" && ep.Observability == nil {
|
||||
if len(ep.HTTP.Middlewares) == 0 && ep.HTTP.TLS == nil && defaultRuleSyntax == "" && ep.Observability == nil && ep.HTTP.EncodedCharacters == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
@ -240,6 +240,18 @@ func (i *Provider) entryPointModels(cfg *dynamic.Configuration) {
|
|||
Middlewares: ep.HTTP.Middlewares,
|
||||
}
|
||||
|
||||
if ep.HTTP.EncodedCharacters != nil {
|
||||
httpModel.DeniedEncodedPathCharacters = &dynamic.RouterDeniedEncodedPathCharacters{
|
||||
AllowEncodedSlash: ep.HTTP.EncodedCharacters.AllowEncodedSlash,
|
||||
AllowEncodedBackSlash: ep.HTTP.EncodedCharacters.AllowEncodedBackSlash,
|
||||
AllowEncodedPercent: ep.HTTP.EncodedCharacters.AllowEncodedPercent,
|
||||
AllowEncodedQuestionMark: ep.HTTP.EncodedCharacters.AllowEncodedQuestionMark,
|
||||
AllowEncodedSemicolon: ep.HTTP.EncodedCharacters.AllowEncodedSemicolon,
|
||||
AllowEncodedHash: ep.HTTP.EncodedCharacters.AllowEncodedHash,
|
||||
AllowEncodedNullCharacter: ep.HTTP.EncodedCharacters.AllowEncodedNullCharacter,
|
||||
}
|
||||
}
|
||||
|
||||
if ep.Observability != nil {
|
||||
httpModel.Observability = dynamic.RouterObservabilityConfig{
|
||||
AccessLogs: ep.Observability.AccessLogs,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue