Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add enable_server_tokens option #727

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions charts/apisix-ingress-controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ The same for container level, you need to set:
| config.logOutput | string | `"stderr"` | the output file path of error log, default is stderr, when the file path is "stderr" or "stdout", logs are marshalled plainly, which is more readable for human; otherwise logs are marshalled in JSON format, which can be parsed by programs easily. |
| config.pluginMetadataCM | string | `""` | Pluginmetadata in APISIX can be controlled through ConfigMap. default is "" |
| fullnameOverride | string | `""` | |
| gateway.enableServerTokens | bool | true | If set to true, shows APISIX version in the `Server` response header. |
| gateway.externalIPs | list | `[]` | load balancer ips |
| gateway.externalTrafficPolicy | string | `"Cluster"` | |
| gateway.nginx.errorLog | string | `"stderr"` | Nginx error logs path |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ data:
apisix:
enable_control: true
enable_reuseport: true
{{- if and (not (eq .Values.gateway.enableServerTokens nil)) (hasKey .Values.gateway "enableServerTokens") }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be like this?

  #values.yaml
  enableServerTokens: true
    # apisix-configmap.yaml
    enable_server_tokens: {{ .Values.gateway.enableServerTokens }}

enable_server_tokens: {{ .Values.gateway.enableServerTokens }}
{{- end }}

stream_proxy:
only: false
Expand Down
3 changes: 3 additions & 0 deletions charts/apisix-ingress-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ gateway:
# - "143.231.0.0/16"
# -- load balancer ips
externalIPs: []
# -- (bool) If set to true, shows APISIX version in the `Server` response header.
# @default -- true
enableServerTokens:
nginx:
# -- Nginx workerRlimitNoFile
workerRlimitNofile: "20480"
Expand Down