I have one self-hold server,eg https: // myserver.com
By default the backend deployment used is beta.meet.jit.si, you can point the Jitsi-Meet app at a different backend by using a proxy server. To do this set the WEBPACK_DEV_SERVER_PROXY_TARGET variable:
export WEBPACK_DEV_SERVER_PROXY_TARGET=https: // myserver.com
make dev
Failed to load https: // myserver.com/http-bind?room=trd01: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘https: // 192.168.7.29:8081’ is therefore not allowed access.
how to resolved this case?
On your deployment in the web server config add the header Access-Control-Allow-Origin’ ‘*’,
For nginx it would look like:
location = /http-bind {
proxy_pass http://localhost:5280/http-bind;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
add_header 'Access-Control-Allow-Origin' '*';
}
Did you try setting some how Access-Control-Allow-Origin in the requests and you forgot to remove that code? It seems strange having rhose headers in the request, I need to check later what my webpack dev server is sending.
for cors header that solution “https://stackoverflow.com/a/36504697” is very helpfull.
3 Likes
Having just run in to this myself ( our branch is not up to date with upstream - and interface_config.js no longer has TOOLBAR_BUTTONS on alpha.jitsi.net )…
Looks like the stackoverflow answer is way overkill for this situation (many unneeded headers being CORS whitelisted), after some trial and error I found I only had to add Content-Type to the list , so ended up just adding the following to nginx config for location = /http-bind
## CORS for local dev - remove for production
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Headers' 'Content-Type';