@hicksy/enhance-csrf
v0.9.0
Published
A CSRF component for enhance projects
Downloads
7
Readme
CSRF component for Enhance projects
example usage
import { createCsrfToken, verifyCsrfToken } from '@hicksy/enhance-csrf/server/csrf.js'
export let get = [createCsrfToken, two]
export let post = [verifyCsrfToken, two]
async function two (req) {
console.log('hi from two')
console.log(req)
return {
session: req.session,
json: {test: 'one', csrf_token: req.session.csrf}
}
}