diff options
Diffstat (limited to 'plugins/http')
-rw-r--r-- | plugins/http/config/http.go | 3 | ||||
-rw-r--r-- | plugins/http/config/static.go | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/plugins/http/config/http.go b/plugins/http/config/http.go index 53a22f3c..59735e2e 100644 --- a/plugins/http/config/http.go +++ b/plugins/http/config/http.go @@ -108,6 +108,9 @@ func (c *HTTP) InitDefaults() error { if c.Static.Pattern == "" { c.Static.Pattern = "/static/" } + if c.Static.Dir == "" { + c.Static.Dir = "." + } } err := c.HTTP2Config.InitDefaults() diff --git a/plugins/http/config/static.go b/plugins/http/config/static.go index 416169d2..e9acc3e4 100644 --- a/plugins/http/config/static.go +++ b/plugins/http/config/static.go @@ -9,11 +9,12 @@ import ( // Static describes file location and controls access to them. type Static struct { // Dir contains name of directory to control access to. + // Default - "." Dir string // HTTP pattern, where to serve static files - // for example - `/static`, `/my-files/static`, etc - // Default - /static + // for example - `/static/`, `/my-files/static/`, etc + // Default - /static/ Pattern string // forbid specifies list of file extensions which are forbidden for access. |