add x-amz-id-2 to indicate the node that received the request (#16474)

This commit is contained in:
Harshavardhana
2023-01-25 22:44:10 +05:30
committed by GitHub
parent 0a0416b6ea
commit 65c104a589
2 changed files with 5 additions and 1 deletions
+3
View File
@@ -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)
}) })
} }
+2 -1
View File
@@ -145,7 +145,8 @@ const (
AmzAccessKeyID = "AWSAccessKeyId" AmzAccessKeyID = "AWSAccessKeyId"
// 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"