Middlewares

Middlewares and helper modules allow you easily plugin/unplugin features for your Macaron applications.

There are already many middlewares and modulesarrow-up-right to simplify your work:

Best register order for middlewares

Some middlewares depends on others, here is a list for best ordering:

  1. macaron.Logger()

  2. macaron.Recovery()

  3. gzip.Gziper()

  4. macaron.Static()

  5. macaron.Renderer()/pongo2.Pongoer()

  6. i18n.I18n()

  7. cache.Cacher()

  8. captcha.Captchaer()

  9. session.Sessioner()

  10. csrf.Csrfer()

  11. toolbox.Toolboxer()

Last updated

Was this helpful?