Jump to content
thirty bees forum

Elastic Search CORS Error [SOLVED]


Saha

Recommended Posts

Failed to load http://localhost:9200/thirtybees11/_search: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://thirtybee.local' is therefore not allowed access.

Link to comment
Share on other sites

I think lesley is right.

The issue here is you need to run it thrue Apache or Nginx in proxy, and make sure the config for that proxy has the right headers set for Access-Control-Allow-Origin.

Apache Header set Access-Control-Allow-Origin "*"

Nginx add_header 'Access-Control-Allow-Origin' '*';

Link to comment
Share on other sites

Setting http.cors.enabled : true http.cors.allow-origin : "*" In Elastic config located at config/elasticsearch.yml Fixed the Issue. But Now i am getting { "error":{ "root_cause":[ { "type":"illegal_argument_exception", "reason":"query malformed, empty clause found at [1:533]" } ], "type":"illegal_argument_exception", "reason":"query malformed, empty clause found at [1:533]" }, "status":400 }

Link to comment
Share on other sites

{ “error”:{ “rootcause”:[ { “type”:“illegalargumentexception”, “reason”:“query malformed, empty clause found at [1:533]” } ], “type”:“illegalargument_exception”, “reason”:“query malformed, empty clause found at [1:533]” }, “status”:400 } @lesley @mdekker Anyone

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...