datasquirel/package-shared/functions/backend/cookies/get-auth-cookie-names.js
Benjamin Toby 8ca2779741 Updates
2024-12-06 11:31:24 +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,
};
};