MCPcopy
hub / github.com/gofiber/fiber / New

Function New

middleware/session/middleware.go:61–68  ·  view source on GitHub ↗

New initializes session middleware with optional configuration. Parameters: - config: Variadic parameter to override default config. Returns: - fiber.Handler: The Fiber handler for the session middleware. Usage: app.Use(session.New()) Usage: app.Use(session.New())

(config ...Config)

Source from the content-addressed store, hash-verified

59//
60// app.Use(session.New())
61func New(config ...Config) fiber.Handler {
62 if len(config) > 0 {
63 handler, _ := NewWithStore(config[0])
64 return handler
65 }
66 handler, _ := NewWithStore()
67 return handler
68}
69
70// NewWithStore creates session middleware with an optional custom store.
71//

Calls 1

NewWithStoreFunction · 0.85