1๐
โ
Hi I think you are essentially making a cross origin request.
To initiate a cross-origin request, a browser sends the request with an Origin HTTP header. The value of this header is the site that served the page.
To allows the request, it sends an Access-Control-Allow-Origin header in its response. The value of the header indicates what origin sites are allowed.
Access-Control-Allow-Origin: localhost:80
Essentially you need to allow an options request on your server side which sends back the
Access-Control-Allow-Origin header
Please go through this for a better idea
Cross domain POST query using Cross-Origin Resource Sharing getting no data back
๐คdusual
Source:stackexchange.com