diff options
author | Valery Piashchynski <[email protected]> | 2020-12-15 12:05:54 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-12-15 12:05:54 +0300 |
commit | c061ebb55e27d80f5b6bfe62a1cc7bd1d7fff281 (patch) | |
tree | 892e194ac101b29d9c549123cb32b701f440c298 /plugins | |
parent | 0652f9f507f3b7a09d0b7f259588c794bd20bc02 (diff) |
Fix races and update CI (remove codecov from windows)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/http/plugin.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/http/plugin.go b/plugins/http/plugin.go index 371cdb91..a6399489 100644 --- a/plugins/http/plugin.go +++ b/plugins/http/plugin.go @@ -183,6 +183,11 @@ func (s *Plugin) Serve() chan error { s.fcgi = &http.Server{Handler: s} } + // apply middlewares before starting the server + if len(s.mdwr) > 0 { + s.addMiddlewares() + } + if s.http != nil { go func() { httpErr := s.http.ListenAndServe() @@ -217,10 +222,6 @@ func (s *Plugin) Serve() chan error { }() } - if len(s.mdwr) > 0 { - s.addMiddlewares() - } - return errCh } |