mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 23:27:25 -04:00
Fixes CORS headers needed by Elastic clients (#85791)
* Fixes CORS headers needed by Elastic clients Updates the default value for the `http.cors.allow-headers` setting to include headers used by Elastic client libraries. Also adds the `access-control-expose-headers` header to responses to CORS requests so that clients can successfully perform their product check.
This commit is contained in:
parent
354d3aea18
commit
484d3f4ada
5 changed files with 62 additions and 4 deletions
|
@ -119,9 +119,16 @@ Which methods to allow. Defaults to `OPTIONS, HEAD, GET, POST, PUT, DELETE`.
|
|||
// tag::http-cors-allow-headers-tag[]
|
||||
`http.cors.allow-headers` {ess-icon}::
|
||||
(<<static-cluster-setting,Static>>, string)
|
||||
Which headers to allow. Defaults to `X-Requested-With, Content-Type, Content-Length`.
|
||||
Which headers to allow. Defaults to `X-Requested-With, Content-Type, Content-Length, Authorization, Accept, User-Agent, X-Elastic-Client-Meta`.
|
||||
// end::http-cors-allow-headers-tag[]
|
||||
|
||||
[[http-cors-expose-headers]]
|
||||
// tag::http-cors-expose-headers-tag[]
|
||||
`http.cors.expose-headers` {ess-icon}::
|
||||
(<<static-cluster-setting,Static>>)
|
||||
Which response headers to expose in the client. Defaults to `X-elastic-product`.
|
||||
// end::http-cors-expose-headers-tag[]
|
||||
|
||||
[[http-cors-allow-credentials]]
|
||||
// tag::http-cors-allow-credentials-tag[]
|
||||
`http.cors.allow-credentials` {ess-icon}::
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue