mirror of
https://gitee.com/johng/gf
synced 2026-07-06 13:42:46 +08:00
add SessionCookieMaxAge configuration for ghttp.Server
This commit is contained in:
@ -8,6 +8,7 @@ import (
|
||||
|
||||
func main() {
|
||||
s := g.Server()
|
||||
s.SetSessionCookieMaxAge(0)
|
||||
s.Group("/", func(group *ghttp.RouterGroup) {
|
||||
group.GET("/set", func(r *ghttp.Request) {
|
||||
r.Session.Set("time", gtime.Timestamp())
|
||||
|
||||
Reference in New Issue
Block a user