From 66722178f997ece5cf5e62c8459b4dd2543a9271 Mon Sep 17 00:00:00 2001 From: Nimrod Teich Date: Wed, 6 Mar 2024 13:22:57 +0200 Subject: [PATCH] Fix lint --- protocol/chainlib/common.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/protocol/chainlib/common.go b/protocol/chainlib/common.go index 3b6729f02b..bca4e460ea 100644 --- a/protocol/chainlib/common.go +++ b/protocol/chainlib/common.go @@ -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))