How to deploy rasa chatbot on wordpress website

Hello!

I am having the same error

   Error: xhr poll error. 

Both the webpage and Rasa endpoint are running to the same server. Nothing is shown in the page except this error in the console. I am running rasa like that:

   rasa run -m models --enable-api --cors "*" --debug

Also the chatbot is working correctly, If i use this chatroom GitHub - scalableminds/chatroom: React-based Chatroom Component for Rasa Stack

This is my code:

  <script>
  !(function () {
   let e = document.createElement("script"),
    t = document.head || document.getElementsByTagName("head")[0];
     (e.src = "https://cdn.jsdelivr.net/npm/rasa-webchat/lib/index.js"),
      (e.async = !0),
      (e.onload = () => {
        window.WebChat.default(
        {
          socketUrl: "http://localhost:5005",
          // add other props here
        },
        null
      );
    }),
    t.insertBefore(e, t.firstChild);
 })();

This is what I can see in the server

 The client is using an unsupported version of the Socket.IO or Engine.IO protocols (further occurrences of this error will be logged with level INFO)

Thank you