Docker CORS issue

ok then… thats mean u are trying to connect to ur own docker jitsi server through api calling ? so u had to set these parameters in “hosts”(domain,muc…etc) in api calling… have u done that ? if so then I wanna see the value u have been set.

like when I was doing my test locally I did

where was my private ip… though that configurations wasn’t correct

All seems to be working from the public-facing web UI. I haven’t used the IP address anywhere except for the DOCKER_HOST_ADDRESS which says to use it.

EDIT: I also haven’t changed any of the “Advanced” config options.

I mean u are calling api from some third party app or plain html… right ? but didn’t u specify the domain name and others while calling api?

var connection = new JitsiMeetJS.JitsiConnection(null, null, options);

here the “options” need to be set… hosts(domain,muc…),bosh .did u do that?

Yes, correct. I’m calling API from a web app. And yes, I did specify those options…

    const options = {
      hosts: {
        domain: '',
        muc: ''
      bosh: '',
      websocket: 'wss://',

      clientNode: ''

(Corrected some copy/paste inaccuracies.)

yeah, I guessed it :slight_smile: I was facing terrible time solving this… follow this thread Docker Server Api Call ERROR - Strophe: Server did not yet offer a supported authentication mechanism. Sending a blank poll request where somewhere middle I explained the actual configurations… hope u will be able to solve yours …

Ok, I’ll take a look.

I’m still puzzled, though, as to why two calls to the same endpoint would return two different sets of headers. :confused:

Thanks for taking the time.

Didnt u facing Strophe error(console log)? the problem isn’t in the header or other… the problem for me(and u hope so) was in the configuration…thats why browser thought no access control allow origin when it wasn’t getting responses due to misconfiguration in the api (my viewpoint explanation)…
for me it was just :

hosts: {
        domain: "meet.jitsi", //meet.jitsi is the internal network of docker-compose
        muc: "", //check to use as it is conference.your.domain for normal 
        anonymousdomain: "meet.jitsi" //don't need if no anonymus is allowed
      bosh: "https://fuji/http-bind" //here "fuji" is which is the private ip of mine, and I edited /etc/hosts to access the ip with name "fuji" and this is the name used for hosting the docker jitsi server

where I did 2 mistakes …

  1. domain : I put
  2. muc :

just changing these 2 things in api solved the whole issue… and make me know if u still getting this error and hope for the best :heart:


Will give it a shot and report back. Thanks!

EDIT: You da man! It works! :+1: :grin:

Please mark your answer above as the solution. I can’t, since I’m not the OP. Perhaps it will help someone else!

Yeah, I now understand. I was hyper-focused on the other error. Thanks again for all the help. Please mark your answer as the solution.

My above ans is actually one of the solution for “strophe error” Docker Server Api Call ERROR - Strophe: Server did not yet offer a supported authentication mechanism. Sending a blank poll request which actually causing problems… “no access control allow origin” is a by product of that problem which I realised…but access control allow origin can be added easily and that’s a different thing… not everyone will face “access control…” due to this reason that’s why I didn’t mark my ans as a solution for CORS issue,because there wasn’t actually a CORS issue…u had certificate,added origin …problem was in the api configuration for specifically docker jitsi server. that’s why firstly I asked about the api configuration of yours. but yeah, I told in the “strophe error…” thread that it was the solution for me,and your problem was also strophe problem, not CORS… :heart:

Got it.

I participate in a number of other forums which also use the Discourse software, and those forums have enabled the option to mark a post as the solution. That’s what I was referring to. I’m not sure why it’s not enabled on this forum. :man_shrugging:

yeah I understand… like in stackoverflow there is a Correct_Mark from who asked the question. I think it should be here… and it would be great to make specific comment a ans. @damencho

1 Like

Hello guys,

i read your solution, but i still can’t figure out, why i can’t connect via api. I have a public server, where docker jitsi is installed. I can access the web ui and everything is working fine. But as soon as i try to connect via app like:

const options = {
hosts: {
domain: “meet.jitsi”,
muc: “”
bosh: “//

i get an error:

Has someone an idea, what i can do to connect?

as you are saying that your docker jitsi server is ok then first try to connect normal public jitsi server “” just by altering some configs. if thats ok too then you will be sure there is no other problem but just api configs for specifically docker server. plz go through Docker Server Api Call ERROR - Strophe: Server did not yet offer a supported authentication mechanism. Sending a blank poll request thread and check whether it works for you or not. I actually said everything what I was facing and how I solved even the silly ones. Thanx

I found an xmpp_cross_domain flag in the .env file. Now it’s working. I found this corss_comain flag in multiple configs, but only .env is working. Thanks anyway!