Lib-jitsi-meet CORS issue in Docker self hosting


I have setup jitsi in a cloud Ubuntu instance using Docker.
The jitsi meet web ui is working fine.

But I am trying to use the lib-jitsi-meet library to create a custom UI.
I thought to use the example first to check if it works fine. But getting CORS issue while trying to run the example lib-jitsi-meet Example.

Here is the error in the browser console when trying to run the example.

Can anyone please help to resolve the issue?
Please let me know if any further information is required from my side.
Any kind of help and hints will be of great help.

Thanks in advance.

The above mentioned issue is now resolved.

Had to set XMPP_CROSS_DOMAIN=true in .env config file.
The CORS issue is gone now but getting BOSH-Connection failed: improper-addressing error in the browser console.

Here is the snippet of the client side config…

const options = {
    hosts: {
        domain: '',
        muc: '' // FIXME: use XEP-0030
    bosh: '', // FIXME: use xep-0156 for that

The BOSH url is opening in the browser.

Can anyone please give some pointers of where the issue is?

sudo nano /etc/prosody/conf.avail/your.domain.cfg.lua

  1. cross_domain_bosh = false → change to true.

  2. uncomment this line
    //https_ports = {}

I think this comment is for the CORS issue. The CORS issue is resolved now.

But currently facing some different issue as I mentioned above
BOSH-Connection failed: improper-addressing.

It would be very helpful if you can give some pointers if you have some idea regarding the same.
All the details are given in the previous comment.

Anyways @iDLE thanks for your reply.

you should give same domain as muc url

muc: ‘

const options = {
hosts: {
domain: ‘’,
muc: '’ // maybe it’s wrong
bosh: ‘’, // FIXME: use xep-0156 for that