working commit

This commit is contained in:
2026-02-07 11:24:30 +02:00
parent f76881a765
commit 90905ace89
6 changed files with 102 additions and 21 deletions
+8 -3
View File
@@ -36,9 +36,14 @@ func (hand *Handler) CheckAccess(rctx *router.Context) (bool, error) {
var res bool
authHeader := rctx.GetHeader("Authorization")
hand.logg.Debugf("Authorization header is %s", authHeader)
username, password, err := auxhttp.ParseBasicAuth(authHeader)
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