From 87f082b58fda2cdbf3ce4025652a00751a431ab4 Mon Sep 17 00:00:00 2001 From: yangbing Date: Tue, 14 Jan 2020 11:13:55 +0800 Subject: [PATCH] fixbug file plugins --- server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) }