sameerkumar18 / aztro

The Astrology API 💫 Get daily horoscope!

Home Page:https://aztro.sameerkumar.website

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cross origin issue - No 'Access-Control-Allow-Origin' header is present on the requested resource

ajaymarathe opened this issue · comments

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 :)

@ajaymarathe Are you making a POST or a GET request?
It should be a POST request

@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 :)