added /v2 auth info
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user