summaryrefslogtreecommitdiff
path: root/plugins/static
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-01-23 17:54:58 +0300
committerValery Piashchynski <[email protected]>2021-01-23 17:54:58 +0300
commit01a6fab935fc2e40d7b6c17ab75a20a74ca23d1d (patch)
tree59967433eb8220e60020011873623a7454941314 /plugins/static
parent29d6020a9e8a3713b22269ed946547c96c24d3da (diff)
Stabilization PR
Diffstat (limited to 'plugins/static')
-rw-r--r--plugins/static/plugin.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/static/plugin.go b/plugins/static/plugin.go
index fa2bcfbe..6e6fa67d 100644
--- a/plugins/static/plugin.go
+++ b/plugins/static/plugin.go
@@ -30,13 +30,19 @@ type Plugin struct {
func (s *Plugin) Init(cfg config.Configurer, log logger.Logger) error {
const op = errors.Op("static_plugin_init")
if !cfg.Has(RootPluginName) {
+
return errors.E(op, errors.Disabled)
}
+
err := cfg.UnmarshalKey(RootPluginName, &s.cfg)
if err != nil {
return errors.E(op, errors.Disabled, err)
}
+ m := make(map[string]interface{})
+ m["http:static"] = nil
+ cfg.Overwrite(m)
+
if s.cfg.Static == nil {
return errors.E(op, errors.Disabled)
}