A -no-file-handling argument was inversed to -file-handling. So, by default no file handling occure from now.
This commit is contained in:
parent
2c583201d7
commit
760d08dcde
@ -18,7 +18,7 @@ var version string
|
|||||||
|
|
||||||
var listenAddress *string = flag.String("listen", "/var/run/dwelling-files/sock", "listen address (ip:port|unix_path)")
|
var listenAddress *string = flag.String("listen", "/var/run/dwelling-files/sock", "listen address (ip:port|unix_path)")
|
||||||
var directoryPath *string = flag.String("path", "/srv/ftp", "path to file share")
|
var directoryPath *string = flag.String("path", "/srv/ftp", "path to file share")
|
||||||
var disableFileHandler *bool = flag.Bool("no-file-handling", false, "disable file handling if it is handled by something else (e.g. NGiNX)")
|
var enableFileHandler *bool = flag.Bool("file-handling", false, "enable file handling if it is handled by something else (e.g. NGiNX)")
|
||||||
var showVersion *bool = flag.Bool("v", false, "show version")
|
var showVersion *bool = flag.Bool("v", false, "show version")
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
@ -30,7 +30,7 @@ func main() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
hand := handlers.New(directoryPath, web.Assets(), *disableFileHandler)
|
hand := handlers.New(directoryPath, web.Assets(), !*enableFileHandler)
|
||||||
srv := server.NewHttpServer()
|
srv := server.NewHttpServer()
|
||||||
|
|
||||||
srv.GET("/*filepath", hand.Index)
|
srv.GET("/*filepath", hand.Index)
|
||||||
|
Loading…
Reference in New Issue
Block a user