align cors settings names with elasticsearch #85738
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
#84316 introduced CORS support with settings:
however Elasticsearch uses a bit different naming schema:
See https://github.com/elastic/elasticsearch/blob/f8c013d0fbb4ac55141891a56282f8b636aea62c/docs/reference/modules/http.asciidoc
We should align the naming across the stack.
Note: we don't use the
kebab-case
naming schema for the settings.Based on this comment [Discuss] API naming convention #52284 (comment) I'm renaming
server.cors.credentials
toserver.cors.allowCredentials
;server.cors.origin
toserver.cors.allowOrigin
.I'd expect we rename (to use snake_case) the settings in both Kibana and Elasticsearch during Settings should use snake_case #7444
we should align schema across the stack.
server.cors.allowOrigin: '*'
is refactored to beserver.cors.allowOrigin: ["*"]
Plugin API changes
I'm going to update the docs in #84316