This Repository contains all middleware for the Iris web framework.
You can contribute also, just make a pull request, try to keep conversion, configuration file: './mymiddleware/config.go' & middleware: './mymiddleware/mymiddleware.go'.
Middleware is just handler(s) which served before the main handler.
$ go get -u github.com/iris-contrib/middleware/$FOLDERNAME
NOTE: When you install one middleware you will have all of them downloaded & installed, no need to re-run the go get foreach middeware.
To a single route
iris.Get("/mypath",myMiddleware1,myMiddleware2,func(ctx *iris.Context){}, func(ctx *iris.Context){},myMiddleware5,myMainHandlerLast)
To a party of routes or subdomain
myparty := iris.Party("/myparty", myMiddleware1,func(ctx *iris.Context){},myMiddleware3)
{
//....
}
To all routes
iris.UseFunc(func(ctx *iris.Context){}, myMiddleware2)
To global, all routes on all subdomains on all parties
iris.MustUseFunc(func(ctx *iris.Context){}, myMiddleware2)