Coder Social home page Coder Social logo

Cross domain problem about jicofo HOT 12 CLOSED

jitsi avatar jitsi commented on July 24, 2024
Cross domain problem

from jicofo.

Comments (12)

damencho avatar damencho commented on July 24, 2024

This is not jicofo, this is jitsi-videobridge that is serving jitsi-meet web app using jetty.

There is no option currently to change cross-origin.
In order to add it you need to modify where the bosh servlet is initialized:
https://github.com/jitsi/jitsi-videobridge/blob/c6acc4aea85c7984ab713ad19d54bc0fc8ac0aa4/src/main/java/org/jitsi/videobridge/rest/PublicRESTBundleActivator.java#L220
Something like the solution described here:
https://stackoverflow.com/questions/29969996/set-access-control-allow-origin-in-jetty
And of course, it needs adding the maven artifact containing CrossOriginFilter:
org.eclipse.jetty
jetty-servlets

from jicofo.

damencho avatar damencho commented on July 24, 2024

This is a jitsi-videobridge issue.
But what are you trying to achieve, having jvb and jicofo on different machines? Having multiple bridges?
I suppose, there are different solutions for your problem that can be implemented without changing the code for any of the components.

from jicofo.

stiekel avatar stiekel commented on July 24, 2024

Thanks so much, We want to add video conference in webapp with jitsi, in my first demo, the jvb and jicofo are in same server, but the webapp served on other machine, so i need jitsi support CORS.

I will check the jvb document, thank you @damencho .

from jicofo.

bgrozev avatar bgrozev commented on July 24, 2024

Thanks so much, We want to add video conference in webapp with jitsi, in my first demo, the jvb and jicofo are in same server, but the webapp served on other machine, so i need jitsi support CORS.

I don't think there's any need for CORS in any of the jitsi components. The web-app only communicates (via http) with prosody, and we use a proxy for "/http-bind" instead.

from jicofo.

stiekel avatar stiekel commented on July 24, 2024

@bgrozev when i request /http-bind directly, Jetty response with Access Control Allow Origin error.

from jicofo.

stiekel avatar stiekel commented on July 24, 2024

@bgrozev And after i config nginx with this guide, Nginx response with BOSH-Connection failed: host-unknown .
BOSH-Connection failed: host-unknown

from jicofo.

bgrozev avatar bgrozev commented on July 24, 2024

Look at the request in the "network" tab.

from jicofo.

thedracle avatar thedracle commented on July 24, 2024

@bgrozev

http-bind is proxied, but Jetty strips all of the headers from Prosody, so even configuring Prosody itself to produce the relevant CORS headers doesn't help.

In the past via the NGINX strategy it was possible to allow a remote origin to connect via BOSH to the videobridge endpoints.

@damencho,

I've tried building a new jitsi-videobridge with a CrossOriginFilter adding those headers in, but the bridge just hangs the moment that filter is added to the servletContextHandler.

Does anyone have a reasonable workaround here?

I think perhaps at the moment it seems like disabling the HTTP service and jetty, and just serving the videobridge itself via port 443 is the most reasonable solution, but it would be great to work through jetty itself.

from jicofo.

bgrozev avatar bgrozev commented on July 24, 2024

I've tried building a new jitsi-videobridge with a CrossOriginFilter adding those headers in, but the bridge just hangs the moment that filter is added to the servletContextHandler.

Did you use this patch? jitsi/jitsi-videobridge#675

from jicofo.

thedracle avatar thedracle commented on July 24, 2024

@bgrozev, That worked great, thankyou!

from jicofo.

damencho avatar damencho commented on July 24, 2024

@raghbendranayak please do not hijack issues and post the same question over and over again. You are not increasing your chances of an answer, but the other way around.

from jicofo.

bgrozev avatar bgrozev commented on July 24, 2024

Probably outdated, re-open if necessary

from jicofo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.