Return 404 for all network operations without network controller.
This will prevent the api from trying to serve network requests in systems where libnetwork is not enabled, returning 404 responses in any case. Signed-off-by: David Calavera <david.calavera@gmail.com> Upstream-commit: eb982e7c00192c8306f9c420fb469f087c7b161d Component: engine
This commit is contained in:
@ -170,6 +170,7 @@ func (s *Server) makeHTTPHandler(handler httputils.APIFunc) http.HandlerFunc {
|
||||
func (s *Server) InitRouters(d *daemon.Daemon) {
|
||||
s.addRouter(local.NewRouter(d))
|
||||
s.addRouter(network.NewRouter(d))
|
||||
|
||||
for _, srv := range s.servers {
|
||||
srv.srv.Handler = s.CreateMux()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user