Get an CORS error When requested elastic search rest API

hi
Im working on React Project and using Axios package for requested Elasticsearch rest API . after call I receive CORS error
how can fix this error and get data ?
error :

Access to XMLHttpRequest at '<self server elastic search Url >' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: Redirect is not allowed for a preflight request.

Thanks for all the help
sorry for

Elasticsearch doesn't run on port 3000, so it's possible that there's a proxy in use there.

tnx for awnser . Elasticsearch run on 9200 port .
http://localhost:3000 is related to react local server

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.