Skip to content

Commit

Permalink
remove server version info (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
Qing Hao authored and GitHub Enterprise committed Apr 9, 2019
1 parent 3301769 commit 01581f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ingress/controller/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ func NewDefault() Configuration {
ProxyHeadersHashMaxSize: 512,
ProxyHeadersHashBucketSize: 64,
ProxyStreamResponses: 1,
ShowServerTokens: true,
ShowServerTokens: false,
SSLBufferSize: sslBufferSize,
SSLCiphers: sslCiphers,
SSLECDHCurve: "auto",
Expand Down
5 changes: 5 additions & 0 deletions rootfs/opt/ibm/router/nginx/template/nginx.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ http {
{{ end }}
error_log {{ $cfg.ErrorLogPath }} {{ $cfg.ErrorLogLevel }};

server_tokens {{ if $cfg.ShowServerTokens }}on{{ else }}off{{ end }};
{{ if not $cfg.ShowServerTokens }}
more_set_headers "Server: ";
{{ end }}

{{ buildResolvers $cfg.Resolver }}

{{/* Whenever nginx proxies a request without a "Connection" header, the "Connection" header is set to "close" */}}
Expand Down

0 comments on commit 01581f9

Please sign in to comment.