SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
simplify func(w http.ResponseWriter, r *http.Request) to http.HandlerFunc
bingoohuangecdeef8c66ea
diff --git a/weed/security/guard.go b/weed/security/guard.goindex 17fe2ea9e1..87ec91ec19 100644--- a/weed/security/guard.go+++ b/weed/security/guard.go@@ -62,7 +62,7 @@ func NewGuard(whiteList []string, signingKey string, expiresAfterSec int, readSireturn 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 checkingreturn fdiff --git a/weed/server/master_server.go b/weed/server/master_server.goindex 82b306fc4d..53ac7b2e24 100644--- a/weed/server/master_server.go+++ b/weed/server/master_server.go@@ -156,7 +156,7 @@ func (ms *MasterServer) SetRaftServer(raftServer *RaftServer) {}}-func (ms *MasterServer) proxyToLeader(f func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request) {+func (ms *MasterServer) proxyToLeader(f http.HandlerFunc) http.HandlerFunc {return func(w http.ResponseWriter, r *http.Request) {if ms.Topo.IsLeader() {f(w, r)