cmd/stepd: Add config key and arguments for the directory document
This commit is contained in:
parent
70a1194bca
commit
dc378008d6
@ -31,7 +31,11 @@ func main () {
|
||||
":8080", cli.ValString)
|
||||
flagHTTPErrorDocument := cli.NewInputFlag (
|
||||
0, "http-error-document",
|
||||
"The document to use for displaying http errors.",
|
||||
"The document to use for displaying errors over http.",
|
||||
"", cli.ValString)
|
||||
flagHTTPDirectoryDocument := cli.NewInputFlag (
|
||||
0, "http-directory-document",
|
||||
"The document to use for displaying directory listings over http.",
|
||||
"", cli.ValString)
|
||||
flagDirectories := cli.NewFlag (
|
||||
'd', "directories",
|
||||
@ -41,6 +45,7 @@ func main () {
|
||||
flagPidFile,
|
||||
flagHTTPAddress,
|
||||
flagHTTPErrorDocument,
|
||||
flagHTTPDirectoryDocument,
|
||||
flagDirectories,
|
||||
cli.NewHelp())
|
||||
cmd.Syntax = "[OPTIONS]... [DIRECTORY]"
|
||||
@ -116,6 +121,7 @@ func main () {
|
||||
StepExt: ucontainer.NewSet(slices.Clone(config["http.step-extension"])...),
|
||||
Index: slices.Clone(config["http.index-file"]),
|
||||
ErrorDocument: config.Get("http.error-document"),
|
||||
DirectoryDocument: config.Get("http.directory-document"),
|
||||
DenyAll: ucontainer.NewSet(configFileName),
|
||||
}
|
||||
if len(handler.StepExt) == 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user