special cookie
This commit is contained in:
parent
eced57ccb6
commit
094ad14dfc
2
Makefile
2
Makefile
|
|
@ -1,4 +1,4 @@
|
||||||
TAG ?= v1.1.16
|
TAG ?= v1.1.17
|
||||||
IMAGE_TAG ?= docker.educg.net/cg/k8s-manager:$(TAG)
|
IMAGE_TAG ?= docker.educg.net/cg/k8s-manager:$(TAG)
|
||||||
|
|
||||||
build: export CGO_ENABLED=0
|
build: export CGO_ENABLED=0
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ func JWTAuthMiddleware(c *gin.Context) {
|
||||||
}
|
}
|
||||||
if authHeader == "debug_special_key:83bsiablwtxv13" {
|
if authHeader == "debug_special_key:83bsiablwtxv13" {
|
||||||
c.Set("username", "cg_wmj")
|
c.Set("username", "cg_wmj")
|
||||||
|
c.SetCookie("Authorization", authHeader, 0, "", "", false, false)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if authHeader == "" {
|
if authHeader == "" {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ func GetFiles(c *gin.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.Info(dir)
|
//log.Info(dir)
|
||||||
ans := make([]string, len(dir))
|
ans := make([]string, len(dir))
|
||||||
for i, d := range dir {
|
for i, d := range dir {
|
||||||
ans[i] = d.Name()
|
ans[i] = d.Name()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue