mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 16:59:22 +02:00
Fix reload panic in Authorize code (#652)
This commit is contained in:
parent
49604ed458
commit
6196278046
1 changed files with 6 additions and 2 deletions
|
@ -88,10 +88,14 @@ func newPolicyEvaluator(opts *config.Options) (evaluator.Evaluator, error) {
|
|||
// UpdateOptions implements the OptionsUpdater interface and updates internal
|
||||
// structures based on config.Options
|
||||
func (a *Authorize) UpdateOptions(opts config.Options) error {
|
||||
if a == nil {
|
||||
return nil
|
||||
}
|
||||
log.Info().Str("checksum", fmt.Sprintf("%x", opts.Checksum())).Msg("authorize: updating options")
|
||||
var err error
|
||||
if a.pe, err = newPolicyEvaluator(&opts); err != nil {
|
||||
pe, err := newPolicyEvaluator(&opts)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
a.pe = pe
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue