静态分发增加例外URL、限制URL、排除隐藏文件等选项

This commit is contained in:
GoEdgeLab
2023-08-10 11:26:53 +08:00
parent 56e0564f5a
commit 10d6f498a1
2 changed files with 54 additions and 22 deletions

View File

@@ -347,7 +347,7 @@ func (this *CreateAction) RunPost(params struct {
var rootJSON []byte
var err error
if len(params.WebRoot) > 0 {
var rootConfig = &serverconfigs.HTTPRootConfig{}
var rootConfig = serverconfigs.NewHTTPRootConfig()
rootConfig.IsOn = true
rootConfig.Dir = params.WebRoot
rootConfig.Indexes = []string{"index.html", "index.htm"}