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
improve performance a little bit when having white list
chrislusf74b045e9b651
diff --git a/go/security/guard.go b/go/security/guard.goindex 3c7e3bce30..1ee1bbd898 100644--- a/go/security/guard.go+++ b/go/security/guard.go@@ -5,7 +5,6 @@ import ("fmt""net""net/http"- "regexp""strings""github.com/chrislusf/seaweedfs/go/glog"@@ -108,8 +107,7 @@ func (g *Guard) checkWhiteList(w http.ResponseWriter, r *http.Request) error {// If the whitelist entry contains a "/" it// is a CIDR range, and we should check the// remote host is within it- match, _ := regexp.MatchString("/", ip)- if match {+ if strings.Contains(ip, "/") {_, cidrnet, err := net.ParseCIDR(ip)if err != nil {panic(err)