added debugging information about the demains
Dieser Commit ist enthalten in:
Ursprung
e6794c7c98
Commit
2c798d6006
3
http.go
3
http.go
|
@ -56,13 +56,16 @@ func (s *Server) StartServer() {
|
|||
// DomainRouter redirects the requests to the routers of the domains
|
||||
func (s *Server) DomainRouter(c *gin.Context) {
|
||||
domain := c.Request.URL.Host
|
||||
entry := log.Trace().Str("domain", domain)
|
||||
if router, found := s.mrouter[domain]; found {
|
||||
entry.Msg("Found domain")
|
||||
router.NoMethod(s.NotFoundHandler)
|
||||
router.NoRoute(s.NotFoundHandler)
|
||||
c.Set("domain", domain)
|
||||
router.HandleContext(c)
|
||||
return
|
||||
}
|
||||
entry.Interface("domains", s.mrouter).Msg("domain not found")
|
||||
s.NotFoundHandler(c)
|
||||
}
|
||||
|
||||
|
|
Laden…
In neuem Issue referenzieren