aboutsummaryrefslogtreecommitdiff
path: root/weed/command/volume.go
diff options
context:
space:
mode:
authorMike Tolman <mike.tolman@fidelissecurity.com>2016-08-05 15:45:48 -0600
committerMike Tolman <mike.tolman@fidelissecurity.com>2016-08-05 15:45:48 -0600
commitce99bb927d163707e83de6a265ce9b77dd4f9d44 (patch)
tree3ceb4ae7212d2cbab28d48703c80620b93cc9b73 /weed/command/volume.go
parent34837afc7adb8ea6955d5cf962af10f8f30fb476 (diff)
downloadseaweedfs-ce99bb927d163707e83de6a265ce9b77dd4f9d44.tar.xz
seaweedfs-ce99bb927d163707e83de6a265ce9b77dd4f9d44.zip
Revert "Adding HTTP verb whitelisting options."
This reverts commit 34837afc7adb8ea6955d5cf962af10f8f30fb476.
Diffstat (limited to 'weed/command/volume.go')
-rw-r--r--weed/command/volume.go16
1 files changed, 5 insertions, 11 deletions
diff --git a/weed/command/volume.go b/weed/command/volume.go
index 68f5edd9e..21369cbe9 100644
--- a/weed/command/volume.go
+++ b/weed/command/volume.go
@@ -2,7 +2,6 @@ package command
import (
"net/http"
- _ "net/http/pprof"
"os"
"runtime"
"strconv"
@@ -33,8 +32,7 @@ type VolumeServerOptions struct {
maxCpu *int
dataCenter *string
rack *string
- readWhitelist []string
- writeWhitelist []string
+ whiteList []string
indexType *string
fixJpgOrientation *bool
readRedirect *bool
@@ -69,8 +67,7 @@ var cmdVolume = &Command{
var (
volumeFolders = cmdVolume.Flag.String("dir", os.TempDir(), "directories to store data files. dir[,dir]...")
maxVolumeCounts = cmdVolume.Flag.String("max", "7", "maximum numbers of volumes, count[,count]...")
- volumeReadWhiteListOption = cmdVolume.Flag.String("read.whitelist", "", "comma separated Ip addresses having read permission. No limit if empty.")
- volumeWriteWhiteListOption = cmdVolume.Flag.String("write.whitelist", "", "comma separated Ip addresses having write permission. No limit if empty.")
+ volumeWhiteListOption = cmdVolume.Flag.String("whiteList", "", "comma separated Ip addresses having write permission. No limit if empty.")
)
func runVolume(cmd *Command, args []string) bool {
@@ -99,11 +96,8 @@ func runVolume(cmd *Command, args []string) bool {
}
//security related white list configuration
- if *volumeReadWhiteListOption != "" {
- v.readWhitelist = strings.Split(*volumeReadWhiteListOption, ",")
- }
- if *volumeWriteWhiteListOption != "" {
- v.writeWhitelist = strings.Split(*volumeWriteWhiteListOption, ",")
+ if *volumeWhiteListOption != "" {
+ v.whiteList = strings.Split(*volumeWhiteListOption, ",")
}
if *v.ip == "" {
@@ -136,7 +130,7 @@ func runVolume(cmd *Command, args []string) bool {
v.folders, v.folderMaxLimits,
volumeNeedleMapKind,
*v.master, *v.pulseSeconds, *v.dataCenter, *v.rack,
- v.readWhitelist, v.writeWhitelist, nil,
+ v.whiteList,
*v.fixJpgOrientation, *v.readRedirect,
)