feat: use cookie to store jwt token, better performance

This commit is contained in:
Simon Ding
2024-07-28 18:07:24 +08:00
parent b024b5f6dc
commit 3de2f89107
11 changed files with 73 additions and 217 deletions

View File

@@ -63,6 +63,7 @@ func (s *Server) Serve() error {
setting := api.Group("/setting")
{
setting.GET("/logout", HttpHandler(s.Logout))
setting.POST("/general", HttpHandler(s.SetSetting))
setting.GET("/general", HttpHandler(s.GetSetting))
setting.POST("/auth", HttpHandler(s.EnableAuth))