@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
JavaScript
import{copy as e}from"../../../libs/i18n/copy.mjs";import t from"../../../constants/constants.mjs";import{getCookie as n}from"hono/cookie";const r=r=>{let i=n(r,t.cookies.csrf),a=r.req.header(t.headers.csrf);return!i||!a||i!==a?{error:{type:`forbidden`,code:`csrf`,message:e(`server:core.security.csrf.validation.failed`)},data:void 0}:{error:void 0,data:void 0}};export{r as default};
//# sourceMappingURL=verify-token.mjs.map