fix: clean server struct once it gets to the handler

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
This commit is contained in:
Henrique Dias committed 2019-01-09 08:13:24 +00:00
1 parent 5a9f0a0d81
commit f1c86054b3
4 files changed
+16 -9

No files matched your search

+2 -1
View File
@@ -14,8 +14,9 @@ type modifyRequest struct {
}
func NewHandler(storage *storage.Storage, server *settings.Server) (http.Handler, error) {
r := mux.NewRouter()
server.Clean()
r := mux.NewRouter()
index, static := getStaticHandlers(storage, server)
monkey := func(fn handleFunc, prefix string) http.Handler {