You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-06-17 00:17:40 +02:00
options: update options parsing for better handling of incorrect values
* don't add in failed compiled regexes for skip auth regex option * improve test coverage for skip auth regex option to handle partial success case * add tests for incorrect upstream options parsing errors
This commit is contained in:
committed by
Tanvir Alam
parent
a7c5d9c478
commit
e955d2be0e
@ -180,8 +180,8 @@ func (o *Options) Validate() error {
|
||||
for _, u := range o.SkipAuthRegex {
|
||||
CompiledRegex, err := regexp.Compile(u)
|
||||
if err != nil {
|
||||
msgs = append(msgs, fmt.Sprintf(
|
||||
"error compiling regex=%q %s", u, err))
|
||||
msgs = append(msgs, fmt.Sprintf("error compiling regex=%q %s", u, err))
|
||||
continue
|
||||
}
|
||||
o.CompiledRegex = append(o.CompiledRegex, CompiledRegex)
|
||||
}
|
||||
|
Reference in New Issue
Block a user