working commit
This commit is contained in:
@@ -36,14 +36,14 @@ func (hand *Handler) CheckAccess(rctx *router.Context) (bool, error) {
|
||||
var res bool
|
||||
|
||||
authHeader := rctx.GetHeader("Authorization")
|
||||
if authHeader != "" {
|
||||
hand.logg.Debugf("Authorization header is %s", authHeader)
|
||||
username, password, err := auxhttp.ParseBasicAuth(authHeader)
|
||||
if err != nil {
|
||||
return res, err
|
||||
}
|
||||
hand.logg.Debugf("Authorization username is %s:%s", username, password)
|
||||
}
|
||||
if authHeader != "" {
|
||||
hand.logg.Debugf("Authorization header is %s", authHeader)
|
||||
username, password, err := auxhttp.ParseBasicAuth(authHeader)
|
||||
if err != nil {
|
||||
return res, err
|
||||
}
|
||||
hand.logg.Debugf("Authorization username is %s:%s", username, password)
|
||||
}
|
||||
|
||||
res = true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user