aboutsummaryrefslogtreecommitdiff
path: root/weed/security/guard.go
diff options
context:
space:
mode:
authorbingoohuang <bingoo.huang@gmail.com>2020-05-25 21:00:12 +0800
committerbingoohuang <bingoo.huang@gmail.com>2020-05-25 21:00:12 +0800
commitecdeef8c66eadbf9b4e8ac7f221444d1d92a9de0 (patch)
treea1830f9e5a8b25be8a4e80aea7f75bbedea6fd22 /weed/security/guard.go
parent16fc3fb1a014a4814a3dd211cdb9e033804ed849 (diff)
downloadseaweedfs-ecdeef8c66eadbf9b4e8ac7f221444d1d92a9de0.tar.xz
seaweedfs-ecdeef8c66eadbf9b4e8ac7f221444d1d92a9de0.zip
simplify func(w http.ResponseWriter, r *http.Request) to http.HandlerFunc
Diffstat (limited to 'weed/security/guard.go')
-rw-r--r--weed/security/guard.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/security/guard.go b/weed/security/guard.go
index 17fe2ea9e..87ec91ec1 100644
--- a/weed/security/guard.go
+++ b/weed/security/guard.go
@@ -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