outposts/proxy: continue compiling additional regexes even when one fails

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-11-28 15:06:26 +01:00
parent 813c13ce45
commit 8b7f698c7b
1 changed files with 2 additions and 1 deletions

View File

@ -149,7 +149,8 @@ func NewApplication(p api.ProxyOutpostConfig, c *http.Client, cs *ak.CryptoStore
re, err := regexp.Compile(regex) re, err := regexp.Compile(regex)
if err != nil { if err != nil {
// TODO: maybe create event for this? // TODO: maybe create event for this?
return nil, errors.Wrap(err, "failed to compile SkipPathRegex") a.log.WithError(err).Warning("failed to compile SkipPathRegex")
continue
} else { } else {
a.UnauthenticatedRegex = append(a.UnauthenticatedRegex, re) a.UnauthenticatedRegex = append(a.UnauthenticatedRegex, re)
} }