Skip to content

Commit

Permalink
fix nil custom response unauthenticated/unauthorized configs
Browse files Browse the repository at this point in the history
Signed-off-by: Guilherme Cassolato <[email protected]>
  • Loading branch information
guicassolato committed Oct 30, 2024
1 parent 0efd1b2 commit 479d49b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions api/v1beta3/authpolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,10 @@ func (p *AuthPolicy) Rules() map[string]kuadrantv1.MergeableRule {
return rules
}

{
rule := spec.AuthScheme.Response.Unauthenticated
if rule := spec.AuthScheme.Response.Unauthenticated; rule != nil {
rules["response.unauthenticated#"] = kuadrantv1.NewMergeableRule(rule, policyLocator)
}
{
rule := spec.AuthScheme.Response.Unauthorized
if rule := spec.AuthScheme.Response.Unauthorized; rule != nil {
rules["response.unauthorized#"] = kuadrantv1.NewMergeableRule(rule, policyLocator)
}

Expand Down

0 comments on commit 479d49b

Please sign in to comment.