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

[7.x] Kibana request headers (#79218) #79665

Merged
merged 1 commit into from
Oct 6, 2020

Conversation

kobelb
Copy link
Contributor

@kobelb kobelb commented Oct 6, 2020

Backports the following commits to 7.x:

* Adding X-Kibana header for the legacy client requests

* Specifying `X-Kibana: true` header for all requests coming from Kibana

* Dev Tools now override the X-Kibana header to false

* DevTools doesn't need to do anything, it's not using the ES client

* Switching from `X-Kibana: true` to `User-Agent: Kibana`

* Switching from `X-Kibana: true` to `User-Agent: Kibana`

* Adding a constant

* Starting to add unit tests...

We currently allow end-users to set whatever headers they'd like to be
forwarded to Elasticsearch with `elasticsearch.customHeaders` and
`elasticsearch.requestHeadersWhitelist`. This is potentially problematic
with us always specifying `User-Agent: kibana` as it could interfere
with what our end-users have done...

* Switching from user-agent to X-elastic-product-origin

* Adding some tests

* Adding and updating the legacy client unit tests
T#

* /s/KIBANA_HEADERS/DEFAULT_HEADERS and a deepFreeze

* Adding comment for why `x-elastic-product-origin` exists
@kobelb kobelb added the backport label Oct 6, 2020
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

distributable file count

id before after diff
default 48008 48009 +1
oss 29329 29330 +1

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@kobelb kobelb merged commit bbf5480 into elastic:7.x Oct 6, 2020
@kobelb kobelb deleted the backport/7.x/pr-79218 branch October 6, 2020 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants