Skip to content

Commit

Permalink
add auth for /meetinfo endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
bitkarrot committed Oct 1, 2024
1 parent 06b34c3 commit 9678f8a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/src/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,13 @@ function startServer() {
// check if user was authorized for the api call
const { host, authorization } = req.headers;
const api = new ServerApi(host, authorization);
if (!api.isAuthorized()) {
log.debug('HiveTalk get meetings - Unauthorized', {
header: req.headers,
body: req.body,
});
return res.status(403).json({ error: 'Unauthorized!' });
}
// Get meetings
try {
const meetings = api.getMeetings(roomList);
Expand Down

0 comments on commit 9678f8a

Please sign in to comment.