For those still facing this same issue -- make sure you load the middleware ( r.Use(sessions.Sessions("mysession", store)) ) before others.
在路由定义之前调用middleware ( r.Use(sessions.Sessions("mysession", store)) )
For those still facing this same issue -- make sure you load the middleware ( r.Use(sessions.Sessions("mysession", store)) ) before others.
在路由定义之前调用middleware ( r.Use(sessions.Sessions("mysession", store)) )