Middlewares
Last updated
Was this helpful?
Last updated
Was this helpful?
Middlewares and helper modules allow you easily plugin/unplugin features for your Macaron applications.
There are already many to simplify your work:
- HTTP Basic authentication
- ACL, RBAC and ABAC authorization based on
- Embed binary data as static and template files
- Request data binding and validation
- Cache manager
- Captcha service
- Generates and validates CSRF tokens
- Gzip compression to all responses
- Internationalization and Localization
- Map and inject dependencies
- Jade templating engine
- HTTP method override
- OAuth 2.0 backend client
- Cookies, users and permissions
- Pongo2 template engine support
- Beego-like render engine (Macaron has built-in template engine, this is another option)
- Session manager
- WebSockets channels binding
- Multiple-site support
- Health check, pprof, profile and statistic services
Some middlewares depends on others, here is a list for best ordering:
macaron.Logger()
macaron.Recovery()
gzip.Gziper()
macaron.Static()
macaron.Renderer()
/pongo2.Pongoer()
i18n.I18n()
cache.Cacher()
captcha.Captchaer()
session.Sessioner()
csrf.Csrfer()
toolbox.Toolboxer()