mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-17 21:24:11 +00:00
feat: cuesheet sharing
feat: locked presets refactor: simplify locked param refactor: create share links
This commit is contained in:
committed by
Carlos Valente
parent
1695b4dc68
commit
6c6f5c2c0f
@@ -121,8 +121,12 @@ export function authenticateSocket(_ws: WebSocket, req: IncomingMessage, next: (
|
||||
return next(new Error('Unauthorized'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a cookie with the provided token
|
||||
* We currently add a full 'rw' permission scope, this should be filtered when dealing with presets
|
||||
*/
|
||||
function setSessionCookie(res: Response, token: string) {
|
||||
res.cookie('token', token, {
|
||||
res.cookie('token', JSON.stringify({ token, scope: 'rw' }), {
|
||||
httpOnly: false, // allow websocket to access cookie
|
||||
secure: true,
|
||||
path: '/', // allow cookie to be accessed from any path
|
||||
|
||||
Reference in New Issue
Block a user