mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-09 21:38:19 +01:00
simplify func(w http.ResponseWriter, r *http.Request) to http.HandlerFunc
This commit is contained in:
1 parent
16fc3fb1a0
commit
ecdeef8c66
2 files changed
+2
-2
No files matched your search
@@ -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