mirror of
https://github.com/minio/minio.git
synced 2025-11-20 01:50:24 -05:00
Remove DeploymentID from response headers (#7815)
Response headers need not contain deployment ID.
This commit is contained in:
@@ -55,6 +55,8 @@ const (
|
||||
|
||||
var trimStrings []string
|
||||
|
||||
var globalDeploymentID string
|
||||
|
||||
// TimeFormat - logging time format.
|
||||
const TimeFormat string = "15:04:05 MST 01/02/2006"
|
||||
|
||||
@@ -154,6 +156,11 @@ func uniqueEntries(paths []string) []string {
|
||||
return m.ToSlice()
|
||||
}
|
||||
|
||||
// SetDeploymentID -- Deployment Id from the main package is set here
|
||||
func SetDeploymentID(deploymentID string) {
|
||||
globalDeploymentID = deploymentID
|
||||
}
|
||||
|
||||
// Init sets the trimStrings to possible GOPATHs
|
||||
// and GOROOT directories. Also append github.com/minio/minio
|
||||
// This is done to clean up the filename, when stack trace is
|
||||
@@ -317,7 +324,9 @@ func logIf(ctx context.Context, err error) {
|
||||
|
||||
// Get the cause for the Error
|
||||
message := err.Error()
|
||||
|
||||
if req.DeploymentID == "" {
|
||||
req.DeploymentID = globalDeploymentID
|
||||
}
|
||||
entry := log.Entry{
|
||||
DeploymentID: req.DeploymentID,
|
||||
Level: ErrorLvl.String(),
|
||||
|
||||
Reference in New Issue
Block a user