mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 02:17:05 +00:00
add Context#ResetRequest and core/handlerconv.FromStdWithNext updates the request for any incoming request changes - https://github.com/kataras/iris/issues/1180
Former-commit-id: 764bf26bcaa3b7bdae0a2bdbf3bf2b6f8c5c546e
This commit is contained in:
@@ -75,6 +75,7 @@ func FromStd(handler interface{}) context.Handler {
|
||||
func FromStdWithNext(h func(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)) context.Handler {
|
||||
return func(ctx context.Context) {
|
||||
next := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
ctx.ResetRequest(r)
|
||||
ctx.Next()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user