backend: remove MEET_COOKIE_SECURE env var and update cookie options for secure and sameSite attributes
This commit is contained in:
parent
9564c7e751
commit
b13f18b4d3
@ -33,8 +33,6 @@ export const {
|
||||
MEET_INITIAL_ADMIN_PASSWORD = 'admin',
|
||||
MEET_INITIAL_API_KEY = '',
|
||||
|
||||
MEET_COOKIE_SECURE = 'false',
|
||||
|
||||
/**
|
||||
* Webhook configuration
|
||||
*
|
||||
|
||||
@ -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
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user