From e8791ae2747515a0975787b4f2c32326cbe494bd Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 15 Jan 2019 13:16:11 +0530 Subject: [PATCH] Remove Minio server arch, version from `Server:` header (#7074) --- cmd/api-headers.go | 2 +- cmd/globals.go | 5 ----- pkg/event/target/webhook.go | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/cmd/api-headers.go b/cmd/api-headers.go index 7ddc508f8..b20188496 100644 --- a/cmd/api-headers.go +++ b/cmd/api-headers.go @@ -36,7 +36,7 @@ func mustGetRequestID(t time.Time) string { // Write http common headers func setCommonHeaders(w http.ResponseWriter) { - w.Header().Set("Server", globalServerUserAgent) + w.Header().Set("Server", "Minio") // Set `x-amz-bucket-region` only if region is set on the server // by default minio uses an empty region. if region := globalServerConfig.GetRegion(); region != "" { diff --git a/cmd/globals.go b/cmd/globals.go index aeae47d3e..f3b6a780e 100644 --- a/cmd/globals.go +++ b/cmd/globals.go @@ -20,7 +20,6 @@ import ( "crypto/x509" "fmt" "os" - "runtime" "time" isatty "github.com/mattn/go-isatty" @@ -162,9 +161,6 @@ var ( // File to log HTTP request/response headers and body. globalHTTPTraceFile *os.File - // Minio server user agent string. - globalServerUserAgent = "Minio/" + ReleaseTag + " (" + runtime.GOOS + "; " + runtime.GOARCH + ")" - globalEndpoints EndpointList // Global server's network statistics @@ -358,7 +354,6 @@ func getGlobalInfo() (globalInfo map[string]interface{}) { "isEnvRegion": globalIsEnvRegion, "isSSL": globalIsSSL, "serverRegion": globalServerRegion, - "serverUserAgent": globalServerUserAgent, // Add more relevant global settings here. } diff --git a/pkg/event/target/webhook.go b/pkg/event/target/webhook.go index 766787a80..d6dfcecad 100644 --- a/pkg/event/target/webhook.go +++ b/pkg/event/target/webhook.go @@ -82,7 +82,6 @@ func (target *WebhookTarget) Send(eventData event.Event) error { return err } - // req.Header.Set("User-Agent", globalServerUserAgent) req.Header.Set("Content-Type", "application/json") resp, err := target.httpClient.Do(req)