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

View file

@ -149,7 +149,8 @@ func NewApplication(p api.ProxyOutpostConfig, c *http.Client, cs *ak.CryptoStore
re, err := regexp.Compile(regex)
if err != nil {
// 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 {
a.UnauthenticatedRegex = append(a.UnauthenticatedRegex, re)
}