simplify func(w http.ResponseWriter, r *http.Request) to http.HandlerFunc
This commit is contained in:
@@ -62,7 +62,7 @@ func NewGuard(whiteList []string, signingKey string, expiresAfterSec int, readSi
|
||||
return g
|
||||
}
|
||||
|
||||
func (g *Guard) WhiteList(f func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request) {
|
||||
func (g *Guard) WhiteList(f http.HandlerFunc) http.HandlerFunc {
|
||||
if !g.isWriteActive {
|
||||
//if no security needed, just skip all checking
|
||||
return f
|
||||
|
||||
Reference in New Issue
Block a user