iris/middleware
2018-05-31 01:39:23 +03:00
..
basicauth fix https://github.com/kataras/iris/issues/879 by @martinnagelberg 2018-01-21 07:14:51 +02:00
i18n update the vendor of the new iris-contrib/i18n to support multi locale files as requested at: https://github.com/kataras/iris/issues/815 2017-11-22 01:01:45 +02:00
logger middleware/logger: new configuration field, defaults to false: Query bool, if true prints the full path, including the URL query as requested at https://github.com/kataras/iris/issues/1017 2018-05-31 01:39:23 +03:00
pprof fix https://github.com/kataras/iris/issues/975 2018-04-25 13:10:27 +03:00
recaptcha Prev Commit: Update to 8.2.3 | Read HISTORY.md | Now: Improve version checker's messages 2017-08-10 21:34:05 +03:00
recover Update to 8.1.0 - a new logger implemented as a solution for https://github.com/kataras/iris/issues/680 2017-07-26 15:30:20 +03:00
README.md update the vendor json library which is used when 'WithOptimizations' passed on 'app.Run' and resolve https://github.com/kataras/iris/pull/839#issuecomment-351374343 2017-12-13 14:37:02 +02:00

Built'n Handlers

Middleware Example
basic authentication iris/_examples/authentication/basicauth
Google reCAPTCHA iris/_examples/miscellaneous/recaptcha
localization and internationalization iris/_examples/miscellaneous/i81n
request logger iris/_examples/http_request/request-logger
profiling (pprof) iris/_examples/miscellaneous/pprof
recovery iris/_examples/miscellaneous/recover

Experimental Handlers

Most of the experimental handlers are ported to work with iris's handler form, from third-party sources.

Middleware Description Example
jwt Middleware checks for a JWT on the Authorization header on incoming requests and decodes it. iris-contrib/middleware/jwt/_example
cors HTTP Access Control. iris-contrib/middleware/cors/_example
secure Middleware that implements a few quick security wins. iris-contrib/middleware/secure/_example
tollbooth Generic middleware to rate-limit HTTP requests. iris-contrib/middleware/tollbooth/_examples/limit-handler
cloudwatch AWS cloudwatch metrics middleware. iris-contrib/middleware/cloudwatch/_example
new relic Official New Relic Go Agent. iris-contrib/middleware/newrelic/_example
prometheus Easily create metrics endpoint for the prometheus instrumentation tool iris-contrib/middleware/prometheus/_example
casbin An authorization library that supports access control models like ACL, RBAC, ABAC iris-contrib/middleware/casbin/_examples
raven Sentry client in Go raven/_example
csrf Cross-Site Request Forgery Protection csrf/_example (hard-tested for Iris) NEW
Third-Party Handlers

iris has its own middleware form of func(ctx context.Context) but it's also compatible with all net/http middleware forms. See here.

Here's a small list of useful third-party handlers:

Middleware Description
goth OAuth, OAuth2 authentication. Example
binding Data binding from HTTP requests into structs
csp Content Security Policy (CSP) support
delay Add delays/latency to endpoints. Useful when testing effects of high latency
onthefly Generate TinySVG, HTML and CSS on the fly
permissions2 Cookies, users and permissions
RestGate Secure authentication for REST API endpoints
stats Store information about your web application (response time, etc.)
VanGoH Configurable AWS-Style HMAC authentication middleware
xrequestid Middleware that assigns a random X-Request-Id header to each request
digits Middleware that handles Twitter Digits authentication

Feel free to put up your own middleware in this list!