Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions services/auth/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ func (b *Basic) Verify(req *http.Request, w http.ResponseWriter, store DataStore
}

auths := strings.SplitN(baHead, " ", 2)
if len(auths) != 2 || (auths[0] != "Basic" && auths[0] != "basic") {
return nil
if len(auths) != 2 || (strings.ToLower(auths[0]) != "basic") {
return nil
}

uname, passwd, _ := base.BasicAuthDecode(auths[1])
Expand Down