Skip to content

Commit

Permalink
fix(server): echo middleware will create new every request cause acce…
Browse files Browse the repository at this point in the history
…ss cache not valid
  • Loading branch information
whatwewant committed Apr 7, 2024
1 parent 517d5c8 commit 210a0ef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ func NewServer(ctx context.Context, profile *profile.Profile, store *store.Store

// ######## CONNECT START
e.Use(connect.Create(os.Getenv("SECRET_KEY")))
accessTokenCache := cache.New()
e.Use(func(next echo.HandlerFunc) echo.HandlerFunc {
return func(c echo.Context) error {
if connectUser, err := connect.GetUser(c); err == nil {
Expand Down

0 comments on commit 210a0ef

Please sign in to comment.