1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-09 21:15:56 +00:00

Thanks goes to all of you you help building this (nice) framework - Update README and add errors on mux entry register

This commit is contained in:
Makis Maropoulos
2016-06-16 05:24:01 +03:00
parent dcded4e400
commit 647f0d704c
5 changed files with 56 additions and 32 deletions

View File

@@ -99,7 +99,7 @@ func New(cfg ...config.Iris) *Framework {
// set the websocket server
s.Websocket = websocket.NewServer(s.Config.Websocket)
// set the servemux, which will provide us the public API also, with its context pool
mux := newServeMux(sync.Pool{New: func() interface{} { return &Context{framework: s} }})
mux := newServeMux(sync.Pool{New: func() interface{} { return &Context{framework: s} }}, s.Logger)
// set the public router API (and party)
s.muxAPI = &muxAPI{mux: mux, relativePath: "/"}
// set the server
@@ -128,7 +128,7 @@ func (s *Framework) initialize() {
// prepare the mux
s.mux.setCorrectPath(!s.Config.DisablePathCorrection)
s.mux.setEscapePath(!s.Config.DisablePathEscape)
s.mux.setHost(s.HTTPServer.VirtualHostname())
s.mux.setHostname(s.HTTPServer.VirtualHostname())
// set the debug profiling handlers if ProfilePath is setted
if debugPath := s.Config.ProfilePath; debugPath != "" {
s.Handle(MethodGet, debugPath+"/*action", profileMiddleware(debugPath)...)