1
0
Fork 0

Session secret key

This commit is contained in:
Alex Myasoedov 2016-03-04 11:20:26 +02:00
parent aeb68a3b79
commit 5569a0b541

View file

@ -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")