appbaseio / dejavu

The Missing Web UI for Elasticsearch: Import, browse and edit data with rich filters and query views, create search UIs visually.

Home Page:https://dejavu.reactivesearch.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not able to connect with AWS managed Elasticsearch

rohitguptaggg opened this issue · comments

Issue
Not able to connect with AWS-managed elastic search.
I am using AWS ES with public access (it is not inside the VPC, ES is accessible through a public URL.)
I am facing a CORS issue as AWS does not provide any way to modify there es configuration file to allow CORS.
So can anyone help me with the way to connect with AWS Managed ES?

Any help on this will be really appreciated.

ERROR

Access to fetch at 'https://test.us-east-2.es.amazonaws.com/main_data-2021-8-16' from origin 'http://localhost:1358' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.

Dejavu Version
Using the latest docker image of Dejavu.

@lakhansamani Can You please provide any update on this?

@rohitguptaggg This isn't an issue with Dejavu and CORS errors can't be solved from a client.

Since you can't modify the AWS ES config, you can set up an API gateway in front of your ES that handles the CORS config and forwards to Elasticsearch. This is typically doable with Nginx, AWS API gateway also seems to offer this feature now (link).

Another option for doing this is via our ReactiveSearch API project, it does more than handling CORS for you.