mirror of
https://github.com/minio/minio.git
synced 2025-04-22 03:24:38 -04:00
add x-amz-id-2 to indicate the node that received the request (#16474)
This commit is contained in:
parent
0a0416b6ea
commit
65c104a589
@ -551,6 +551,9 @@ func addCustomHeaders(h http.Handler) http.Handler {
|
|||||||
// part of the log entry, Error response XML and auditing.
|
// part of the log entry, Error response XML and auditing.
|
||||||
// Set custom headers such as x-amz-request-id for each request.
|
// Set custom headers such as x-amz-request-id for each request.
|
||||||
w.Header().Set(xhttp.AmzRequestID, mustGetRequestID(UTCNow()))
|
w.Header().Set(xhttp.AmzRequestID, mustGetRequestID(UTCNow()))
|
||||||
|
if globalLocalNodeName != "" {
|
||||||
|
w.Header().Set(xhttp.AmzRequestNodeID, globalLocalNodeName)
|
||||||
|
}
|
||||||
h.ServeHTTP(xhttp.NewResponseRecorder(w), r)
|
h.ServeHTTP(xhttp.NewResponseRecorder(w), r)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -146,6 +146,7 @@ const (
|
|||||||
|
|
||||||
// Response request id.
|
// Response request id.
|
||||||
AmzRequestID = "x-amz-request-id"
|
AmzRequestID = "x-amz-request-id"
|
||||||
|
AmzRequestNodeID = "x-amz-id-2"
|
||||||
|
|
||||||
// Deployment id.
|
// Deployment id.
|
||||||
MinioDeploymentID = "x-minio-deployment-id"
|
MinioDeploymentID = "x-minio-deployment-id"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user