some fixing
All checks were successful
Build & Push Docker Image / build (push) Successful in 1m6s

This commit is contained in:
2026-02-24 18:55:21 +01:00
parent 44ebdcb8ee
commit cf74ed31af
7 changed files with 30 additions and 16 deletions

View File

@@ -39,7 +39,7 @@ function getRoomPasswords(uid) {
return { moderatorPW: modPw, attendeePW: attPw };
}
export async function createMeeting(room) {
export async function createMeeting(room, logoutURL) {
const { moderatorPW, attendeePW } = getRoomPasswords(room.uid);
const params = {
meetingID: room.uid,
@@ -54,6 +54,9 @@ export async function createMeeting(room) {
'meta_bbb-origin': 'Redlight',
'meta_bbb-origin-server-name': 'Redlight',
};
if (logoutURL) {
params.logoutURL = logoutURL;
}
if (room.max_participants > 0) {
params.maxParticipants = room.max_participants.toString();
}

View File

@@ -15,6 +15,9 @@ const __dirname = path.dirname(__filename);
const app = express();
const PORT = process.env.PORT || 3001;
// Trust proxy for correct req.protocol behind reverse proxy
app.set('trust proxy', true);
// Middleware
app.use(cors());
app.use(express.json());

View File

@@ -198,7 +198,7 @@ router.post('/:uid/start', authenticateToken, async (req, res) => {
return res.status(404).json({ error: 'Raum nicht gefunden oder keine Berechtigung' });
}
await createMeeting(room);
await createMeeting(room, `${req.protocol}://${req.get('host')}`);
const joinUrl = await joinMeeting(room.uid, req.user.name, true);
res.json({ joinUrl });
} catch (err) {
@@ -326,7 +326,7 @@ router.post('/:uid/guest-join', async (req, res) => {
// If meeting not running but anyone_can_start, create it
if (!running && room.anyone_can_start) {
await createMeeting(room);
await createMeeting(room, `${req.protocol}://${req.get('host')}`);
}
// Check moderator code