Error with cors on configuring a different bosh url

I had tried differents approach for this with no success.
I have jitsi frontend on a server serverfront.example… and I have all the backend(prosody, jicofo and videobridge) on other server serverback.example…

I have the CORS error.
I can work around it using nginx add_header on the reverse proxy configuration for OPTIONS requests.
With other methods like post, it can be done like that. The nginx send the request to prosody and prosody return an error.
This is the prosody error:

Feb 19 21:12:41 jcp56328401f050 info Incoming Jabber component connection
Feb 19 21:12:41 mod_component debug Received invalid XML (syntax error) 808 bytes: POST /http-bind?room=testtt HTTP/1.0 X-Forwarded-For: Host: serverback… Connection: close Content-Length: 214 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/82.0.4056.3 Safari/537.36 Content-Type: text/xml; [0]
Feb 19 21:12:41 mod_component info Disconnecting component, stream:error is: not-well-formed
Feb 19 21:12:41 jcp56328401f050 info component disconnected: nil (false)

And nginx
location = /http-bind {
if ( $request_method = OPTIONS ) {
add_header Access-Control-Allow-Origin ‘’;
add_header Access-Control-Allow-Methods ‘PUT, GET, OPTIONS, HEAD’;
add_header Access-Control-Allow-Headers ‘Authorization, Content-Type’;
add_header Access-Control-Allow-Credentials ‘true’;
add_header Content-Length 0;
add_header Content-Type text/plain;
return 200;
add_header ‘Access-Control-Allow-Origin’ '
add_header ‘Access-Control-Allow-Headers’ ‘Content-Type, User-Agent’;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host;

I dont know how to trace inside prosody rather than looking at the log. But no good info is showed.
I tried with prosody cross_domain configuration without success.

Thanks in advance
The http where removed because new user only can post 2 links on the topic :confused:

It is working now.
For those who may have the same problem. While using a different nginx server for backend the prosody server add an Access-Control-Allow-Origin header, also the default jitsi configuration is adding the same header and the options part, also add the same header. So the problem was that the request response contain multiple Access-Control-Allow-Origin headers. That was triggering the error.
Best regards