Running into CORS errors when using elasticsearch-js client

I'm running into the following error message when using elasticsearch-jshttps://github.com/elasticsearch/elasticsearch-js/client:

No 'Access-Control-Allow-Origin' header is present on the requested
resource. Origin 'http://localhost:9090' is therefore not allowed access.

There is a brief mention of cross browser in the code:

But looking at that I'm not sure how to initialize the client any
differently.

My topology looks like:
express+nodejs (laptop) <-> APIGEE (proxy) <-> Elasticsearch

Perhaps this is not about the elasticsearch-js client?

Thanks!

  • Pulkit

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/aa65d51d-8f5a-4a52-aa2f-ea69d6e0590b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yup this didn't have anything to do with the client. For anyone else who is
a big fan of pairing elastisearch with APIGEE ... the solution is
here: api - Apigee Pre-Flight Options Requests - Stack Overflow

On Saturday, March 29, 2014 9:30:36 AM UTC-5, pulkitsinghal wrote:

I'm running into the following error message when using elasticsearch-jshttps://github.com/elasticsearch/elasticsearch-js/client:

No 'Access-Control-Allow-Origin' header is present on the requested
resource. Origin 'http://localhost:9090' is therefore not allowed access.

There is a brief mention of cross browser in the code:

https://github.com/elasticsearch/elasticsearch-js/blob/30f27494644b0dd893f69d69327a5f41c723da52/src/lib/connectors/xhr.js?L-20#L20-L24
But looking at that I'm not sure how to initialize the client any
differently.

My topology looks like:
express+nodejs (laptop) <-> APIGEE (proxy) <-> Elasticsearch

Perhaps this is not about the elasticsearch-js client?

Thanks!

  • Pulkit

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/139a61a0-2786-4d66-9a0c-55592dae28d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.