Skip to content

Commit

Permalink
chore: rename resolution to resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
danroc committed Oct 31, 2024
1 parent c53a2de commit d047392
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,24 +65,24 @@ func getForwardAuth(
return
}

resolution := resolver.Resolve(sourceIP)
resolved := resolver.Resolve(sourceIP)

query := rules.Query{
query := &rules.Query{
RequestedDomain: domain,
SourceIP: sourceIP,
SourceCountry: resolution.CountryCode,
SourceASN: resolution.ASN,
SourceCountry: resolved.CountryCode,
SourceASN: resolved.ASN,
}

logFields := log.Fields{
FieldRequestedDomain: domain,
FieldSourceIP: sourceIP,
FieldSourceCountry: resolution.CountryCode,
FieldSourceASN: resolution.ASN,
FieldSourceOrg: resolution.Organization,
FieldSourceCountry: resolved.CountryCode,
FieldSourceASN: resolved.ASN,
FieldSourceOrg: resolved.Organization,
}

if engine.Authorize(&query) {
if engine.Authorize(query) {
log.WithFields(logFields).Info("Request authorized")
writer.WriteHeader(http.StatusNoContent)
} else {
Expand Down

0 comments on commit d047392

Please sign in to comment.