added /v2 auth info

This commit is contained in:
2026-03-17 10:23:01 +02:00
parent 791e04cdf1
commit 97904e0529
2 changed files with 36 additions and 35 deletions
+5 -4
View File
@@ -10,7 +10,7 @@
package handler
import (
//"net/http"
"net/http"
"mstore/app/imageoper"
"mstore/app/router"
@@ -21,14 +21,15 @@ func (hand *Handler) GetVersion(rctx *router.Context) {
params := &imageoper.GetVersionParams{}
//hand.DumpHeaders("GetVersion", rctx)
/*
authorization := rctx.GetHeader("Authorization")
if authorization == "" {
rctx.SetHeader("WWW-Authenticate", `Basic realm="mstore"`)
rctx.SetStatus(http.StatusUnauthorized)
//rctx.SetStatus(http.StatusUnauthorized)
rctx.SetStatus(http.StatusOK)
return
}
*/
ctx := rctx.GetContext()
_, code, err := hand.imop.GetVersion(ctx, params)
if err != nil {