summaryrefslogtreecommitdiff
path: root/plugins/headers/plugin.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/headers/plugin.go')
-rw-r--r--plugins/headers/plugin.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/headers/plugin.go b/plugins/headers/plugin.go
index 84194d7e..a5ee702f 100644
--- a/plugins/headers/plugin.go
+++ b/plugins/headers/plugin.go
@@ -22,7 +22,7 @@ type Plugin struct {
// misconfiguration. Services must not be used without proper configuration pushed first.
func (s *Plugin) Init(cfg config.Configurer) error {
const op = errors.Op("headers_plugin_init")
- if !cfg.Has(PluginName) {
+ if !cfg.Has(RootPluginName) {
return errors.E(op, errors.Disabled)
}
err := cfg.UnmarshalKey(RootPluginName, &s.cfg)
@@ -30,6 +30,10 @@ func (s *Plugin) Init(cfg config.Configurer) error {
return errors.E(op, errors.Disabled, err)
}
+ if s.cfg.Headers == nil {
+ return errors.E(op, errors.Disabled)
+ }
+
return nil
}