add option to redirect moved or non-local volumes
fix https://github.com/chrislusf/seaweedfs/issues/168
This commit is contained in:
@@ -35,6 +35,7 @@ type VolumeServerOptions struct {
|
||||
whiteList []string
|
||||
indexType *string
|
||||
fixJpgOrientation *bool
|
||||
readRedirect *bool
|
||||
}
|
||||
|
||||
func init() {
|
||||
@@ -52,6 +53,7 @@ func init() {
|
||||
v.rack = cmdVolume.Flag.String("rack", "", "current volume server's rack name")
|
||||
v.indexType = cmdVolume.Flag.String("index", "memory", "Choose [memory|leveldb|boltdb] mode for memory~performance balance.")
|
||||
v.fixJpgOrientation = cmdVolume.Flag.Bool("images.fix.orientation", true, "Adjust jpg orientation when uploading.")
|
||||
v.readRedirect = cmdVolume.Flag.Bool("read.redirect", true, "Redirect moved or non-local volumes.")
|
||||
}
|
||||
|
||||
var cmdVolume = &Command{
|
||||
@@ -129,7 +131,7 @@ func runVolume(cmd *Command, args []string) bool {
|
||||
volumeNeedleMapKind,
|
||||
*v.master, *v.pulseSeconds, *v.dataCenter, *v.rack,
|
||||
v.whiteList,
|
||||
*v.fixJpgOrientation,
|
||||
*v.fixJpgOrientation, *v.readRedirect,
|
||||
)
|
||||
|
||||
listeningAddress := *v.bindIp + ":" + strconv.Itoa(*v.port)
|
||||
|
||||
Reference in New Issue
Block a user