mirror of
https://github.com/lightninglabs/aperture.git
synced 2026-01-31 15:14:26 +01:00
l402: remove unnecessary regexp MatchString call
The same regexp is then used in a call of FindStringSubmatch method and the outcome is the same, if nothing is found there.
This commit is contained in:
@@ -56,9 +56,6 @@ func FromHeader(header *http.Header) (*macaroon.Macaroon, lntypes.Preimage, erro
|
||||
for _, authHeader := range authHeaders {
|
||||
log.Debugf("Trying to authorize with header value "+
|
||||
"[%s].", authHeader)
|
||||
if !authRegex.MatchString(authHeader) {
|
||||
continue
|
||||
}
|
||||
matches = authRegex.FindStringSubmatch(authHeader)
|
||||
if len(matches) != 4 {
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user