summaryrefslogtreecommitdiff
path: root/plugins/static
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-02-23 19:00:44 +0300
committerValery Piashchynski <[email protected]>2021-02-23 19:00:44 +0300
commitfdbf6a61600745b5cb1022117dcd9b06d392dc84 (patch)
treec6b7711f4dfa9873415ff0525887917cc521fd7e /plugins/static
parent7dc61c309a34d21630bc1ad53c53211b3dc985de (diff)
- Remove unneeded mutex from the `http.Workers` method.
- Rename `checker` plugin package to `status`, remove `/v1` endpoint prefix (#557) - Add static, headers, status, gzip plugins to the `main.go`. Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/static')
-rw-r--r--plugins/static/plugin.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/static/plugin.go b/plugins/static/plugin.go
index 1687cf11..5f108701 100644
--- a/plugins/static/plugin.go
+++ b/plugins/static/plugin.go
@@ -47,7 +47,7 @@ func (s *Plugin) Init(cfg config.Configurer, log logger.Logger) error {
err = s.cfg.Valid()
if err != nil {
- return errors.E(op, errors.Disabled, err)
+ return errors.E(op, err)
}
return nil
@@ -88,7 +88,6 @@ func (s *Plugin) handleStatic(w http.ResponseWriter, r *http.Request) bool {
f, err := s.root.Open(fPath)
if err != nil {
- s.log.Error("file open error", "error", err)
if s.cfg.AlwaysServe(fPath) {
w.WriteHeader(404)
return true