How to access OpenMRS REST web services with different IP from localhost:3000?

I have an OpenMRS installed in VM of different IP. Now I want to request the IP from localhost:3000. How can I do it?

I tried to request http:///v1/session/authenticate with username and password as payloads, but it gives error as:

Access to XMLHttpRequest at 'https://<IP-with-other-directory-paths>/v1/session/authenticate' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.

OR,

xhr.js:178 POST https://<IP-with-other-directory-paths>/v1/session/authenticate net::ERR_FAILED

Hi @sam1220

It seems like you have CORS issues , try to enable it on either sides for the particular Url’s ,and request again