I am getting an error while accessing HTTP API

I have created one bot UI and using rasa run -m models --enable-api --log-file out.log this command I have run the models with HTTP API but when I send a request to http://localhost:5005/webhooks/rest/webhook this URL it is giving me an error Access to XMLHttpRequest at ‘http://localhost:5005/webhooks/rest/webhook’ from origin ‘http://localhost’ 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.

Can anyone please tell me how to solve this problem.

I have disabled the CORS using this extenstion. Allow CORS: Access-Control-Allow-Origin – Get this Extension for 🦊 Firefox (en-US) I am using Mozilla Firefox. Now I am able to post the data to given URL

hey @sagarvanave,

Instead of running you can try the below command which will allow CORS:

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

It’s ok that you have mozilla firefox browser but for testing on other browser the above command will help :sweat_smile:

1 Like

ok. thanks :blush:

Hi everyone,

I can’t manage to get my server running properly.

It can’t seem to be able to load my model.

I keep getting these messages:

2020-03-26 14:41:51 DEBUG rasa.core.agent - No new model found at URL http://my-server.com/models/default_core@latest

2020-03-26 14:42:00 DEBUG rasa.core.agent - Requesting model from server http://my-server.com/models/default_core@latest

2020-03-26 14:42:21 DEBUG rasa.core.agent - Tried to fetch model from server, but couldn’t reach server. We’ll retry later… Error: Cannot connect to host my-server.com:80 ssl:default [Connect call failed (‘69.172.201.153’, 80)].

I would really appreciate if you could help me please ! :smiley:

Bob