allow requests to be proxied when server is booting up (#10790)

when server is booting up there is a possibility
that users might see '503' because object layer
when not initialized, then the request is proxied
to neighboring peers first one which is online.
This commit is contained in:
Harshavardhana
2020-10-30 12:20:28 -07:00
committed by GitHub
parent 3a2f89b3c0
commit 02cfa774be
6 changed files with 137 additions and 15 deletions

View File

@@ -39,6 +39,10 @@ func registerDistErasureRouters(router *mux.Router, endpointServerSets EndpointS
// List of some generic handlers which are applied for all incoming requests.
var globalHandlers = []MiddlewareFunc{
// add redirect handler to redirect
// requests when object layer is not
// initialized.
setRedirectHandler,
// set x-amz-request-id header.
addCustomHeaders,
// set HTTP security headers such as Content-Security-Policy.