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
|
// DomainRouter redirects the requests to the routers of the domains
|
||||||
func (s *Server) DomainRouter(c *gin.Context) {
|
func (s *Server) DomainRouter(c *gin.Context) {
|
||||||
domain := c.Request.URL.Host
|
domain := c.Request.URL.Host
|
||||||
|
entry := log.Trace().Str("domain", domain)
|
||||||
if router, found := s.mrouter[domain]; found {
|
if router, found := s.mrouter[domain]; found {
|
||||||
|
entry.Msg("Found domain")
|
||||||
router.NoMethod(s.NotFoundHandler)
|
router.NoMethod(s.NotFoundHandler)
|
||||||
router.NoRoute(s.NotFoundHandler)
|
router.NoRoute(s.NotFoundHandler)
|
||||||
c.Set("domain", domain)
|
c.Set("domain", domain)
|
||||||
router.HandleContext(c)
|
router.HandleContext(c)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
entry.Interface("domains", s.mrouter).Msg("domain not found")
|
||||||
s.NotFoundHandler(c)
|
s.NotFoundHandler(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Laden…
In neuem Issue referenzieren