Development setup cross domain


#1

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?


#2

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' '*';
}

#3

still not work



#4

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.


#5

for cors header that solution “https://stackoverflow.com/a/36504697” is very helpfull.


#6

Thanks. it is ok now