Skip to content

Commit

Permalink
Added back the code to authenticate a request using a query parameter.
Browse files Browse the repository at this point in the history
This is required for video streaming to work.
  • Loading branch information
ashleydavis committed Jun 30, 2024
1 parent 90d2164 commit 5e6c8b8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backend/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ export async function createServer(now: () => Date, db: Db, storage: IStorage) {
return;
}

// Check if the token exists in the query parameters.
if (!req.headers.authorization && req.query && req.query.t) {
// Add the token to the Authorization header.
req.headers.authorization = `Bearer ${req.query.t}`;
}

next();
});

Expand Down

0 comments on commit 5e6c8b8

Please sign in to comment.