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:
18
iris.go
18
iris.go
@@ -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.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user