We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1943fa1 + a40d42a commit c28680cCopy full SHA for c28680c
examples/with-fiber/main.go
@@ -119,14 +119,19 @@ func main() {
119
120
// wrapper of the original implementation of verify session to match the required function signature
121
func verifySession(options *sessmodels.VerifySessionOptions) fiber.Handler {
122
+ shouldCallNext := false
123
return func(c *fiber.Ctx) error {
124
err := adaptor.HTTPHandlerFunc(session.VerifySession(options, func(rw http.ResponseWriter, r *http.Request) {
125
c.SetUserContext(r.Context())
126
+ shouldCallNext = true
127
}))(c)
128
if err != nil {
129
return err
130
}
- return c.Next()
131
+ if shouldCallNext {
132
+ return c.Next()
133
+ }
134
+ return nil
135
136
137
0 commit comments