diff options
author | Valery Piashchynski <[email protected]> | 2020-12-01 17:33:47 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-12-01 17:33:47 +0300 |
commit | 3805b875c6498a9697c692c010bc022e8ebd50b0 (patch) | |
tree | 00635f6a6e9b1029e302f8e96faa7ab269fb43bd /plugins/headers | |
parent | 84c8234ec01ad1d5ea5f0a8c7dbca9a3012bcb2b (diff) |
golangci linters fix
Diffstat (limited to 'plugins/headers')
-rw-r--r-- | plugins/headers/plugin.go | 5 |
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() |