소스 검색

Session secret key

Alex Myasoedov 8 년 전
부모
커밋
5569a0b541
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      main.go

+ 2 - 2
main.go

@@ -13,14 +13,14 @@ import (
 	"github.com/gin-gonic/gin"
 )
 
-const SessionHeader = "slide-session"
+const sessionHeader = "slide-session"
 
 func NewApp() *gin.Engine {
 
 	r := gin.Default()
 
 	store := sessions.NewCookieStore([]byte("secret"))
-	r.Use(sessions.Sessions(SessionHeader, store))
+	r.Use(sessions.Sessions(sessionHeader, store))
 
 	r.LoadHTMLGlob("templates/*.tmpl")
 	r.Static("/static", "./static")