diff --git a/server.go b/server.go index fd7243a..e062857 100644 --- a/server.go +++ b/server.go @@ -171,9 +171,9 @@ func (s *Server) SetPlugins(v []interface{}) { name := vv.(string) switch name { case "gzip": - s.plugins = append(s.plugins, NewGzip()) + s.AddPlugin(NewGzip()) case "file": - s.plugins = append(s.plugins, NewFile(App().componentConf("file"))) + s.AddPlugin(NewFile(nil)) default: panic("For the defined plug-in:" + name) }