mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-15 20:06:19 +08:00
fix syntax error
This commit is contained in:
@@ -384,11 +384,13 @@ func runVolume(cmd *Command, args []string) bool {
|
|||||||
func secure(f func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request) {
|
func secure(f func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request) {
|
||||||
return func(w http.ResponseWriter, r *http.Request) {
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
if *whiteList == "" {
|
if *whiteList == "" {
|
||||||
return f(w, r)
|
f(w, r)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
ip := r.RemoteAddr[0:strings.Index(r.RemoteAddr, ":")]
|
ip := r.RemoteAddr[0:strings.Index(r.RemoteAddr, ":")]
|
||||||
if strings.Contains(*whiteList, ip) {
|
if strings.Contains(*whiteList, ip) {
|
||||||
return f(w, r)
|
f(w, r)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user