mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-04-22 09:36:44 +00:00
feat: add disable exec flag (#1090)
This commit is contained in:
committed by
GitHub
parent
1529e796df
commit
97693cc611
@@ -64,6 +64,7 @@ func addServerFlags(flags *pflag.FlagSet) {
|
||||
flags.Int("img-processors", 4, "image processors count")
|
||||
flags.Bool("disable-thumbnails", false, "disable image thumbnails")
|
||||
flags.Bool("disable-preview-resize", false, "disable resize of image previews")
|
||||
flags.Bool("disable-exec", false, "disables Command Runner feature")
|
||||
}
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
@@ -241,6 +242,9 @@ func getRunParams(flags *pflag.FlagSet, st *storage.Storage) *settings.Server {
|
||||
_, disablePreviewResize := getParamB(flags, "disable-preview-resize")
|
||||
server.ResizePreview = !disablePreviewResize
|
||||
|
||||
_, disableExec := getParamB(flags, "disable-exec")
|
||||
server.EnableExec = !disableExec
|
||||
|
||||
return server
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user