UNPKG

@lucidcms/core

Version:

The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.

2 lines 427 B
import e from"../../../constants/constants.mjs";import t from"../../../utils/helpers/is-request-secure.mjs";import n from"node:crypto";import{setCookie as r}from"hono/cookie";const i=async i=>{let a=n.randomBytes(32).toString(`hex`);return r(i,e.cookies.csrf,a,{maxAge:e.csrfExpiration,httpOnly:!0,secure:t(i),sameSite:`strict`,path:`/`}),{error:void 0,data:a}};export{i as default}; //# sourceMappingURL=generate-token.mjs.map