appbaseio / appbase-js

appbase.io search client library for JavaScript
MIT License
42 stars 18 forks source link

feat: enable telemetry in appbase-js #76

Closed mohdashraf010897 closed 2 years ago

mohdashraf010897 commented 2 years ago

PR Type: Feature

Description: Enabling telemetry.

Changes:

Notion Card

🔗 Docs PR

How did I test the PR?

jazarja commented 2 years ago

I found this telemetry patch will require x-search-client header to be included in elastic CORS setting (which not included by default on elastic guide: https://www.elastic.co/guide/en/cloud-enterprise/current/ece-configure-cors.html)

Otherwise this error will be raised by client browser: Access to XMLHttpRequest at 'https://<server>/_msearch?' from origin 'https://<server>' has been blocked by CORS policy: Request header field x-search-client is not allowed by Access-Control-Allow-Headers in preflight response.