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

Conversation

mstefany
Copy link
Contributor

@mstefany mstefany commented Mar 5, 2024

APISIX/nginx server tokens are enabled by default, and leak APISIX version is form of a header - Server: APISIX/3.8.0. Add option to allow to disable version leak, turning header into Server: APISIX (full removal of the header is probably possible only using header-manipulating plugins).

@Revolyssup
Copy link
Contributor

@mstefany Can you address the lint issue?

@mstefany
Copy link
Contributor Author

@Revolyssup Should be fixed now, please, review the code and provide feedback or approve.

@Revolyssup Revolyssup self-requested a review March 20, 2024 18:55
@@ -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 }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants