Cross origin issue - No 'Access-Control-Allow-Origin' header is present on the requested resource
ajaymarathe opened this issue · comments
Ajay Marathe commented
Hi there,
I am using this API with React.js
and giving cross-origin
issue, below are the error:-
Access to XMLHttpRequest at 'https://aztro.readthedocs.io/en/latest/' (redirected from 'https://aztro.sameerkumar.website/?sign=aries&day=today') from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I will suggest you to add headers
in your backend.
thanks :)
Sameer Kumar commented
@ajaymarathe Are you making a POST or a GET request?
It should be a POST request
Ajay Marathe commented
@ajaymarathe Are you making a POST or a GET request?
It should be a POST request
@sameerkumar18 Yeah it is POST
request. actually I was hitting get
request, this is why I getting cross-issue
, but later I read docs and changed that to post and it works, thanks bro :)