-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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(proxy) add configuration options to hide server tokens and latency tokens #2259
Changes from 11 commits
df51142
1b766c2
f62edfd
f4c607c
1a3c9bd
b851ca9
1870c79
59bfa28
2b42ab1
7f10580
0372b38
d769504
dc51940
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,6 +61,8 @@ local CONF_INFERENCES = { | |
cluster_advertise = {typ = "string"}, | ||
nginx_worker_processes = {typ = "string"}, | ||
upstream_keepalive = {typ = "number"}, | ||
server_tokens = {typ = "boolean"}, | ||
latency_tokens = {typ = "boolean"}, | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't those be called 'headers' instead of 'tokens' There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Tieske it is debatable (both works for me): http://nginx.org/en/docs/http/ngx_http_core_module.html#server_tokens There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the conclusion, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just leave it at tokens. |
||
database = {enum = {"postgres", "cassandra"}}, | ||
pg_port = {typ = "number"}, | ||
|
@@ -424,7 +426,7 @@ local function load(path, custom_conf) | |
-- initialize the dns client, so the globally patched tcp.connect method | ||
-- will work from here onwards. | ||
assert(require("kong.tools.dns")(conf)) | ||
|
||
return setmetatable(conf, nil) -- remove Map mt | ||
end | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,8 @@ admin_ssl = on | |
admin_ssl_cert = NONE | ||
admin_ssl_cert_key = NONE | ||
upstream_keepalive = 60 | ||
server_tokens = on | ||
latency_tokens = on | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. those also need to be added to the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added. |
||
database = postgres | ||
pg_host = 127.0.0.1 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could explain a bit more what this change is about and respect the 80 cols limit as well. Maybe:
Also in general, there is no need to point to the configuration guide for new config fields, since the guide does not elaborate more on properties than the
kong.conf.default
file,which already has a comment for each property.