1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-21 03:47:04 +00:00

Add a better example for the recaptcha middleware as requested at: https://github.com/kataras/iris/issues/799

Former-commit-id: 85c3286a9d6be5cf47631e7608f70f3790934e64
This commit is contained in:
kataras
2017-11-04 02:59:21 +02:00
parent 7cd78df9e3
commit ef41e07d4e
11 changed files with 153 additions and 59 deletions

View File

@@ -17,7 +17,6 @@ import (
"path/filepath"
"reflect"
"regexp"
"runtime"
"strconv"
"strings"
"time"
@@ -1056,7 +1055,7 @@ func (ctx *context) Proceed(h Handler) bool {
// HandlerName returns the current handler's name, helpful for debugging.
func (ctx *context) HandlerName() string {
return runtime.FuncForPC(reflect.ValueOf(ctx.handlers[ctx.currentHandlerIndex]).Pointer()).Name()
return HandlerName(ctx.handlers[ctx.currentHandlerIndex])
}
// Do sets the handler index to zero, executes the first handler