Skip to content

Commit

Permalink
feat: new middlewares
Browse files Browse the repository at this point in the history
  • Loading branch information
hokamsingh committed Aug 26, 2024
1 parent d8aa3b2 commit 4077ead
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/lessgo/less.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,18 @@ func WithFileUpload(uploadDir string) router.Option {
return router.WithFileUpload(uploadDir)
}

func WithCaching(redisAddr string, ttl time.Duration) router.Option {
return router.WithCaching(redisAddr, ttl)
}

func WithCsrf() router.Option {
return router.WithCsrf()
}

func WithXss() router.Option {
return router.WithXss()
}

// // ServeStatic creates a file server handler to serve static files
// func ServeStatic(pathPrefix, dir string) http.Handler {
// return router.ServeStatic(pathPrefix, dir)
Expand Down

0 comments on commit 4077ead

Please sign in to comment.