-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Return a Server header with server version #6583
Comments
Can i take this issue? |
Id like to work on this issue. This is my first open-source issue contribution. |
Thanks. Looking forward to some PRs! |
I've started work on this. I have a few queries. Within the describe the solution section above the two examples of the Server header are OpenSearch/2.3.0 (Unix) and OpenSearch/2.3.0 (Amazon OpenSearch). Firstly will the first part of this be OpenSearch or does this change? Secondly, where would I get the values from. Examples have been given how you can send requests off to obtain distribution ie the "OpenSearch" bit and the version number "2.3.0" but I doubt you want to send a request off during the building of a response and there is no example of how to get the "(Unix)" or "(Amazon OpenSearch)" part of the header value. Many thanks for your responses in advance. @dblock |
Also where the best place to add the code to add the header in? I was thinking within DefaultRestChannel where custom headers are added |
I would default to a dynamic header that produces "OpenSearch/2.3.0 (XYZ)", but also allow to overwrite it completely in the configuration, including the ability to set it to blank and therefore remove it. Thus someone running a managed service can say something/anything else including things like Amazon OpenSearch. For the configuration, there's the question of whether it should be a node/cluster-wide configuration, think about that one as you implement it. Not familiar with this code path, so not sure where! |
How do I retrieve the text that's in the brackets (XYZ)? Would this be a user input? Or is there a value in the code base already |
I think we can use the distribution type/target for this, the same stuff returned from |
Resolved by #8084 |
Is your feature request related to a problem? Please describe.
Clients are trying to figure out what version of OpenSearch/Elasticsearch they are talking to. I've seen several ways of doing so.
GET /
Contains
distribution
andnumber
.GET /_nodes
using node version (version
)GET /_nodes
using module/plugin version info (opensearch_version
)GET /_cat/plugins
YYMV
Describe the solution you'd like
Return server version in a
Server:
header with every response, e.g.Server: OpenSearch/2.3.0 (Unix)
.Make it configurable, so cloud vendors can identify themselves, e.g.
Server: OpenSearch/2.3.0 (Amazon OpenSearch)
.The text was updated successfully, but these errors were encountered: