What configuration is required in Rasa platform to avoid CORS access api issue???

I have configured RASA and it was running in 5002 port. I am trying to access this bot using api call from another web application developed using ReactJS. While accessing i am getting CORS error that Access to fetch at “url” from origin “url” has been blocked by CORS Policy.

Tried enabling CORS in chrome and its not working. I read somewhere imiwin and imibet that some configuration needs to change in Rasa bot side to access the api response from rasa bot. Any help here? :expressionless:

When you run rasa use the --cors "*" parameter, that will allow you to enable cors on the rasa server and your API should work then.

This is what I run

rasa run -m models --enable-api --log-file out.log --cors "*"

There’s a handful of other parameters you can set depending on where your model, endpoints.yml, config.yml files are stored as well - Command Line Interface