I am trying to clone and customise the livechat widget of rocketchat. On setting up the widget and hitting from my local server it gives me CORS error on port 3000 (where live chat apis are served from). I am serving widget-demo.html from localhost:5500. The error says
Access to fetch at 'http://localhost:3000/api/v1/livechat/page.visited' from origin 'http://localhost:8080' 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. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.