How to set CORS domain for a Server Quick-Install?

I installed Rasa X on our ubuntu server using Server Quick-Install script and later enabled using environment variables + quick-install script. Using botfront/rasa-webchat as the frontend chat widget. I want to secure the websocket but unfortunately rasa-webchat doent support JWT Authentication yet. So is it possible to add our domain to CORS or is there any other way to secure the socket?

1 Like

I wrote an article on how to secure the rasa rest channel but the nginx part might apply to sockets as well, you can use auth introspection to support authentication via your M2M auth provider and validate JWT tokens as well. keeping the rasa part transparent while securing the endpoints you need.


Thank you for the quick response. Im new to this and little confused with the guide. Isn’t there a quick install related guide? atleast adding our domain to cors headers is enough for the moment

1 Like

How do you start the rasa server?

1 Like

I just used the environment variables + quick-install script method to start the server with the websocket enabled

you need to start the rasa server with cors enabled

append --cors “*” to the rasa run command

but how do I update the default run command used in quick install? under “Customize Your Deployment” they have mentioned about using “values.yml” to modify the parameters of an existing deployment but cant see how to use that to modify run command

The quick install is using the rasa x helm charts. You can pass the values in the rasa.args as an array ['--cors', '"*"']

something happened and everything cors blocked now. even the requests worked before. below is my values.yml file

  args: ['--cors', '"*"']
      user_message_evt: user_uttered
      bot_message_evt: bot_uttered
      session_persistence: true
  certificateSecret: "ssl-cert"

then used sudo helm upgrade --values values.yml --namespace rasa --reuse-values rasa rasa-x/rasa-x

i dont know remember how to pass the values in the helm chart.

to enable cors in Rasa

one must use rasa run --cors "*" i think you would need to the pass this argument to the args.

check the logs perhaps

Its ok. Thank you for your time. rasa-worker and rasa-production pods were stuck at crashloopbackoff. So deleted the namespace and installed quick install script again. Ill try to figure out what happened. Thanks again for pointing me in the right direction.

Hi @Chamila26, Did you solve your issue? If yes, please share what config you used in your values.yml. It’ll be very helpful for the community.

Unfortunately I didn’t. Tried few different ways but every time got different errors. It was taking so long so I had to park it and move on with other tasks

Doing this Unable to pass cors "*" as args to helm install - #12 by basudev worked for me. Hopefully, it solves your issue too.