Can I prevent creation of rooms other than a pre-authorised list?

I want to allow only a small set of fixed meeting room names on my Jitsi Meet installation.

So if someone visits an allowed URL like:

What I would like to stop, though, is people creating other rooms:

Is there a config file somewhere in Jitsi/Prosody/etc where I can do this?

If not… well, I could probably do it myself in .htaccess if I were using Apache, by disallowing any URL that doesn’t match something in a defined list, but I’m a complete newbie with nginx. If someone happens to be a whizz at nginx config, I’d be super grateful for something I can copy and paste that will do this for me. Thank you!

OK, answering my own question: yes, this is possible, by editing /etc/nginx/sites-available/jitsi.example.com.conf. Open up the file and look for this part:

location ~ ^/([^/?&:'"]+)$ {
        try_files $uri @root_path;
}

And change it to this:

# location ~ ^/([^/?&:'"]+)$ {
#     try_files $uri @root_path;
# }

location ~ ^/(French|Spanish|TeacherChat)$ {
    try_files $uri @root_path;
}

The domain will now allow only the three authorised chatrooms mentioned in the question above. If a user attempts to create other rooms, they get a 404 error.

4 Likes

Thanks, that worked for me.
SSF

Completely blocked the creation of unauthorized rooms? how did you do it?

From what I can see he did it on nginx level.
Before the request reaches jitsi it’s cut off by the webserver.
Nice hack btw :slight_smile:

I replied to my own question with the solution that I worked out – it’s the first comment, by me, immediately below the question.

As @ethbian says, I blocked the non-authorised URLs at the server level before they reach Jitsi at all. Only when the user requests a URL containing one of the list of authorised meeting room names does the webserver pass the request to Jitsi to do something with.

1 Like

sorry for chipping in, could it be revised with pattern like, like for example : room123, room234

and where the “123” is the dynamic room to be generated?

I solved it using regex and its working okay now! :slight_smile: thanks for the idea though it helps me

Thank you so much, it works for me as well.