1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 18:07:01 +00:00

init of v11.2.0: add context#FullRequestURI and NewConditionalHandler

As requested at: https://github.com/kataras/iris/issues/1167 and https://github.com/kataras/iris/issues/1170


Former-commit-id: 781c92f444b3e362011be886b32cf88f89998589
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-01-19 23:33:33 +02:00
parent 571ef59adf
commit 3fcc70b891
6 changed files with 152 additions and 6 deletions

18
iris.go
View File

@@ -341,6 +341,24 @@ var (
//
// A shortcut for the `context#LimitRequestBodySize`.
LimitRequestBodySize = context.LimitRequestBodySize
// NewConditionalHandler returns a single Handler which can be registered
// as a middleware.
// Filter is just a type of Handler which returns a boolean.
// Handlers here should act like middleware, they should contain `ctx.Next` to proceed
// to the next handler of the chain. Those "handlers" are registed to the per-request context.
//
//
// It checks the "filter" and if passed then
// it, correctly, executes the "handlers".
//
// If passed, this function makes sure that the Context's information
// about its per-request handler chain based on the new "handlers" is always updated.
//
// If not passed, then simply the Next handler(if any) is executed and "handlers" are ignored.
// Example can be found at: _examples/routing/conditional-chain.
//
// A shortcut for the `context#NewConditionalHandler`.
NewConditionalHandler = context.NewConditionalHandler
// StaticEmbeddedHandler returns a Handler which can serve
// embedded into executable files.
//