dsql-admin/dsql-app/package-shared/functions/backend/cookies/get-auth-cookie-names.js
Benjamin Toby 8b7ea057d0 Updates
2024-12-06 14:24:26 +01:00

14 lines
454 B
JavaScript

module.exports = function getAuthCookieNames() {
const cookiesPrefix = process.env.DSQL_COOKIES_PREFIX || "dsql_";
const cookiesKeyName = process.env.DSQL_COOKIES_KEY_NAME || "key";
const cookiesCSRFName = process.env.DSQL_COOKIES_CSRF_NAME || "csrf";
const keyCookieName = cookiesPrefix + cookiesKeyName;
const csrfCookieName = cookiesPrefix + cookiesCSRFName;
return {
keyCookieName,
csrfCookieName,
};
};