Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nimrod-teich committed Mar 6, 2024
1 parent 63069b9 commit 6672217
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions protocol/chainlib/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,13 +401,13 @@ func (rd *RefererData) SendReferer(refererMatchString string, chainId string, ms
userAgent := ""

if headers != nil {
referer = c.Locals(metrics.RefererHeaderKey).(string)
origin = c.Locals(metrics.OriginHeaderKey).(string)
userAgent = c.Locals(metrics.UserAgentHeaderKey).(string)
} else if c != nil {
referer = strings.Join(headers[metrics.RefererHeaderKey], ", ")
origin = strings.Join(headers[metrics.OriginHeaderKey], ", ")
userAgent = strings.Join(headers[metrics.UserAgentHeaderKey], ", ")
} else if c != nil {
referer, _ = c.Locals(metrics.RefererHeaderKey).(string)
origin, _ = c.Locals(metrics.OriginHeaderKey).(string)
userAgent, _ = c.Locals(metrics.UserAgentHeaderKey).(string)
}

utils.LavaFormatDebug("referer detected", utils.LogAttr("referer", refererMatchString))
Expand Down

0 comments on commit 6672217

Please sign in to comment.