mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-04 20:51:44 +00:00
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>
This commit is contained in:
committed by
Tibor Vass
parent
292d3b2052
commit
f2bbcab6c9
@@ -24,4 +24,13 @@ var (
|
||||
Description: "The client version is too old for the server",
|
||||
HTTPStatusCode: http.StatusBadRequest,
|
||||
})
|
||||
|
||||
// ErrorNetworkControllerNotEnabled is generated when the networking stack in not enabled
|
||||
// for certain platforms, like windows.
|
||||
ErrorNetworkControllerNotEnabled = errcode.Register(errGroup, errcode.ErrorDescriptor{
|
||||
Value: "NETWORK_CONTROLLER_NOT_ENABLED",
|
||||
Message: "the network controller is not enabled for this platform",
|
||||
Description: "Docker's networking stack is disabled for this platform",
|
||||
HTTPStatusCode: http.StatusNotFound,
|
||||
})
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user