Cross-Origin Request Blocked


I am trying to send http request from javascript client and I am getting CORS error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

Any ideas?

P.S: I am using ES on Docker with legacy protocols enabled (TCP and AtomPub)

You appear to be connecting to the default TCP port. The default HTTP port is 2113.

I have tried with both 2113 and 1113

@Joao_Braganca any thoughts?

Works on the previous version v5.

I have tried samples from the docs using ESDB 20.6.1 single node running in Docker, with insecure mode. With curl I get no errors and everything works as documented.

Yes it works with curl on terminal and with postman but when sending from JS client it’s not working. Also, with v5 it’s works but not on the latest.

I only had CORS errors when I mistyped the URL and added an extra slash at the end of http://localhost:2113/info. I have never used POST, but all the gets work fine from the browser. I used axios in the browser.

I think URL you can see from the attachments above and I also use it with axios but with POST request. Same code works for v5 and it doesn’t for v20!!!

I have tried it with secure v20 instance of it as well and result is same. Ping status works from the browser but from cross domain it doesn’t work.Any thoughts?