backend: remove MEET_COOKIE_SECURE env var and update cookie options for secure and sameSite attributes

This commit is contained in:
juancarmore 2025-10-06 18:25:32 +02:00
parent 9564c7e751
commit b13f18b4d3
2 changed files with 2 additions and 5 deletions

View File

@ -33,8 +33,6 @@ export const {
MEET_INITIAL_ADMIN_PASSWORD = 'admin',
MEET_INITIAL_API_KEY = '',
MEET_COOKIE_SECURE = 'false',
/**
* Webhook configuration
*

View File

@ -1,12 +1,11 @@
import { CookieOptions } from 'express';
import ms, { StringValue } from 'ms';
import { MEET_COOKIE_SECURE } from '../environment.js';
export const getCookieOptions = (path: string, expiration?: string): CookieOptions => {
return {
httpOnly: true,
secure: MEET_COOKIE_SECURE === 'true',
sameSite: 'strict',
secure: true,
sameSite: 'none',
maxAge: expiration ? ms(expiration as StringValue) : undefined,
path
};