mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 10:41:03 +01:00
be03f915bb
// The Iris' vendored badger it's self-vendored as well. // Why? // Because they were changing their public API a lot and iris was unable to built itself... // https://github.com/dgraph-io/badger/pull/256 // https://github.com/dgraph-io/badger/pull/254 // https://github.com/dgraph-io/badger/pull/261 // I fixed everything by pushing a PR(the original's repository tests were failing) from the kataras/badger to the dgraph-io/badger: // https://github.com/dgraph-io/badger/pull/264 // But it's better to have it on its own folder for the shake of stability, // Iris should be not affected of any third-party changes, // this method guards against upstream renames and deletes. Former-commit-id: 56e796cc96ac93024c1c53905ae9a78b81b37230 |
||
---|---|---|
.. | ||
basicauth | ||
i18n | ||
logger | ||
pprof | ||
recaptcha | ||
recover | ||
README.md |
Built'n Handlers
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 |
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!