Skip to content
Collection of middlewares created by the community
Branch: master
Clone or download
Latest commit 7fb7810 May 26, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
commonlog Add missing user identifier part Jun 21, 2016
cors [ci skip] Add EOL-warning. Dec 8, 2016
expvar [ci skip] update readme. Dec 15, 2016
ginrus Create Oct 31, 2018
gzip [ci skip] Add EOL-warning. Dec 8, 2016
jwt fixes broken tests (#124) Nov 28, 2016
newrelic Fixes contrib for Gin v1.0 May 22, 2015
renders/multitemplate add EOL warning on multitemplate package. Dec 13, 2016
rest Add CRUD API ( gin-gonic/gin#97 ) Jan 4, 2015
secure Fixes contrib for Gin v1.0 May 22, 2015
sentry docs: [ci skip] move sentry to gin-contrib/sentry Jan 13, 2017
static add EOL warning on static package. Dec 13, 2016
.gitignore Add cache middleware Jul 9, 2014
.travis.yml Update .travis.yml Mar 2, 2019
LICENSE Create LICENSE May 26, 2019 add gin-go-metrics to readme (#181) May 10, 2019


Build Status

Here you'll find middleware ready to use with Gin Framework. Submit your pull request, either with the package in a folder, or by adding a link to this

If adding a package directly, don't forget to create a inside with author name. If adding a link to your own repository, please follow this example:

+ nameOfMiddleware (

Each author is responsible of maintaining his own code, although if you submit as a package, you allow the community to fix it. You can also submit a pull request to fix an existing package.

List of external middleware

  • RestGate - Secure authentication for REST API endpoints
  • staticbin - middleware/handler for serving static files from binary data
  • gin-cors - Official CORS gin's middleware
  • gin-csrf - CSRF protection
  • gin-health - middleware that simplifies stat reporting via gocraft/health
  • gin-merry - middleware for pretty-printing merry errors with context
  • gin-revision - Revision middleware for Gin framework
  • gin-jwt - JWT Middleware for Gin Framework
  • gin-sessions - session middleware based on mongodb and mysql
  • gin-location - middleware for exposing the server's hostname and scheme
  • gin-nice-recovery - panic recovery middleware that let's you build a nicer user experience
  • gin-limit - limits simultaneous requests; can help with high traffic load
  • gin-limit-by-key - An in-memory middleware to limit access rate by custom key and rate.
  • ez-gin-template - easy template wrap for gin
  • gin-hydra - Hydra middleware for Gin
  • gin-glog - meant as drop-in replacement for Gin's default logger
  • gin-gomonitor - for exposing metrics with Go-Monitor
  • gin-oauth2 - for working with OAuth2
  • static An alternative static assets handler for the gin framework.
  • xss-mw - XssMw is a middleware designed to "auto remove XSS" from user submitted input
  • gin-helmet - Collection of simple security middleware.
  • gin-jwt-session - middleware to provide JWT/Session/Flashes, easy to use while also provide options for adjust if necessary. Provide sample too.
  • gin-template - Easy and simple to use html/template for gin framework.
  • gin-redis-ip-limiter - Request limiter based on ip address. It works with redis and with a sliding-window mechanism.
  • gin-method-override - Method override by POST form param _method, inspired by Ruby's same name rack
  • gin-access-limit - An access-control middleware by specifying allowed source CIDR notations.
  • gin-session - Session middleware for Gin
  • gin-stats - Lightweight and useful request metrics middleware
  • gin-statsd - A Gin middleware for reporting to statsd deamon
  • gin-health-check - A health check middleware for Gin
  • gin-session-middleware - A efficient, safely and easy-to-use session library for Go.
  • ginception - Nice looking exception page
  • gin-inspector - Gin middleware for investigating http request.
  • gin-dump - Gin middleware/handler to dump header/body of request and response. Very helpful for debugging your applications.
  • go-gin-prometheus - Gin Prometheus metrics exporter
  • gin-go-metrics - Gin middleware to gather and store metrics using rcrowley/go-metrics
You can’t perform that action at this time.