Cors Enable

HI All, I am new in rasa. I am have just created simple rasa bot and it working fine in rasa shell and if i enable api then in postman also working fine. but when i calling it from ajax for my html then gives error “Access to XMLHttpRequest at ‘http://localhost:5005/webhooks/rest/webhook’ from origin ‘http://localhost:8000’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.” but 5005 is working fine in post man.

So the rasa project str is like:- -data -core -stories.md -nlu -nlu_data.md -models -actions.py -config.yml -endppoints.yml -endpoints.yml -nlu_tensorflow.yml

and i have also tried “rasa run --cors=’’ & --enable_api = true" and "rasa run --endpoints endpoints.yml --cors '’” and “rasa run --endpoints endpoints.yml” but none of these work for me.

If anyone knows then please help me out. Thanks

hi @haneef, try the below command:

rasa run -m models --enable-api --cors “*” --debug

1 Like

@JiteshGaikwad I have clarification how to run the rasa server on rasa.ai.com (provided static IP and domain name) instead of localhost:5005, my environment is windows and offline environment (there is no access internet)