mirror of
https://github.com/kataras/iris.git
synced 2025-02-02 15:30:36 +01:00
fix issue on binding sessions caused by variadic cookie options, as reported at: https://github.com/kataras/iris/issues/1197
Former-commit-id: 595a347706b6816729939a2e9d9098f5d3f72304
This commit is contained in:
parent
701267e034
commit
eb22309aec
|
@ -36,7 +36,8 @@ func init() {
|
|||
}
|
||||
|
||||
di.DefaultTypeChecker = func(fn reflect.Type) bool {
|
||||
// valid if that single input arg is a typeof context.Context.
|
||||
return fn.NumIn() == 1 && IsContext(fn.In(0))
|
||||
// valid if that single input arg is a typeof context.Context
|
||||
// or first argument is context.Context and second argument is a variadic, which is ignored (i.e new sessions#Start).
|
||||
return (fn.NumIn() == 1 || (fn.NumIn() == 2 && fn.IsVariadic())) && IsContext(fn.In(0))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user