summaryrefslogtreecommitdiff
path: root/plugins/headers
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/headers')
-rw-r--r--plugins/headers/plugin.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/headers/plugin.go b/plugins/headers/plugin.go
index b49575bb..629c0f30 100644
--- a/plugins/headers/plugin.go
+++ b/plugins/headers/plugin.go
@@ -34,7 +34,6 @@ func (s *Plugin) Init(cfg config.Configurer) error {
func (s *Plugin) Middleware(next http.Handler) http.HandlerFunc {
// Define the http.HandlerFunc
return func(w http.ResponseWriter, r *http.Request) {
-
if s.cfg.Headers.Request != nil {
for k, v := range s.cfg.Headers.Request {
r.Header.Add(k, v)
@@ -60,6 +59,10 @@ func (s *Plugin) Middleware(next http.Handler) http.HandlerFunc {
}
}
+func (s *Plugin) Name() string {
+ return PluginName
+}
+
// configure OPTIONS response
func (s *Plugin) preflightRequest(w http.ResponseWriter, r *http.Request) {
headers := w.Header()