separate frontend
This commit is contained in:
parent
2cb68861aa
commit
1613c2839e
2
Makefile
2
Makefile
|
|
@ -1,4 +1,4 @@
|
|||
IMAGE_TAG ?= docker.educg.net/cg/k8s-manager:v1.1.1
|
||||
IMAGE_TAG ?= docker.educg.net/cg/k8s-manager:v1.1.2
|
||||
|
||||
build: export CGO_ENABLED=0
|
||||
build: export GOOS=linux
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ spec:
|
|||
serviceAccountName: dev
|
||||
containers:
|
||||
- name: k8s-manager-pod
|
||||
image: docker.educg.net/cg/k8s-manager:v1.0.4
|
||||
image: docker.educg.net/cg/k8s-manager:v1.1.2
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
env:
|
||||
|
|
|
|||
15
main.go
15
main.go
|
|
@ -14,7 +14,6 @@ import (
|
|||
"io/fs"
|
||||
m "k8s-manager/src"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
|
@ -164,13 +163,13 @@ func Login(c *gin.Context, username string) {
|
|||
c.SetCookie("Authorization", "Bearer "+token, 0, "", "", false, false)
|
||||
c.Header("Authorization", "Bearer "+token)
|
||||
c.Header("Cache-Control", "no-store")
|
||||
redirectUrl := ""
|
||||
if os.Getenv("URL_PREFIX") == "" {
|
||||
redirectUrl = "/index"
|
||||
} else {
|
||||
redirectUrl = fmt.Sprintf("/%s/index", os.Getenv("URL_PREFIX"))
|
||||
}
|
||||
c.Redirect(http.StatusTemporaryRedirect, redirectUrl)
|
||||
//redirectUrl := ""
|
||||
//if os.Getenv("URL_PREFIX") == "" {
|
||||
// redirectUrl = "/index"
|
||||
//} else {
|
||||
// redirectUrl = fmt.Sprintf("/%s/index", os.Getenv("URL_PREFIX"))
|
||||
//}
|
||||
c.Redirect(http.StatusTemporaryRedirect, "/admin-page")
|
||||
}
|
||||
|
||||
func TestToken(c *gin.Context) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue