Access control errors with Rasa rest channel

I’m having access control errors (CORS) while making requests to “http://localhost:5005/webhooks/rest/webhook” via HTTP requests. Oddly, I’m having no trouble at all on my local system. And I can make successful XPOST curl requests (from my host machine) to “http://localhost:5005/webhooks/rest/webhook”.

I use docker-compose for deployment, so that might be having an effect (although I used docker-compose on my local machine, and had no issues).

I’ve tried:

  • enabling CORS headers on my apache web server
  • enabling CORS headers in my HTTP requests
  • using the cors “*” command when running the rasa service, via my docker-compose file:

image

This is the error message from Firefox:

Does anyone have any ideas?

where are you sending the requests from? If it’s a deployment on a server with docker-compose, you should be using the IP address instead of localhost right?

1 Like

Thanks akelad, that worked like a charm. Forgive someone not too experienced building web apps. For reference I changed the rasa server url for the post request from

http://localhost:5005/webhooks/rest/webhook

to

http://[my IP address]:5005/webhooks/rest/webhook

1 Like