@fastify/csrf-protection
Advanced tools
Comparing version 7.0.0-pre.fv5.1 to 7.0.0-pre.fv5.2
@@ -140,3 +140,3 @@ 'use strict' | ||
module.exports = fp(fastifyCsrfProtection, { | ||
fastify: '4.x', | ||
fastify: '5.x', | ||
name: '@fastify/csrf-protection' | ||
@@ -143,0 +143,0 @@ }) |
{ | ||
"name": "@fastify/csrf-protection", | ||
"version": "7.0.0-pre.fv5.1", | ||
"version": "7.0.0-pre.fv5.2", | ||
"description": "A plugin for adding CSRF protection to Fastify.", | ||
@@ -41,6 +41,6 @@ "main": "index.js", | ||
"@fastify/session": "^11.0.0-pre.fv5.1", | ||
"@types/node": "^20.12.7", | ||
"@types/node": "^22.0.0", | ||
"fastify": "^5.0.0-alpha.3", | ||
"proxyquire": "^2.1.3", | ||
"sinon": "^17.0.1", | ||
"sinon": "^18.0.0", | ||
"standard": "^17.1.0", | ||
@@ -47,0 +47,0 @@ "tap": "^18.7.2", |
@@ -9,3 +9,3 @@ /// <reference types="node" /> | ||
interface FastifyInstance { | ||
csrfProtection(req: FastifyRequest, reply: FastifyReply, done: () => void): any; | ||
csrfProtection(req: FastifyRequest, reply: FastifyReply, done: () => void): void; | ||
} | ||
@@ -12,0 +12,0 @@ |
@@ -37,2 +37,4 @@ import Fastify from 'fastify' | ||
}) | ||
fastify.addHook('onRequest', fastify.csrfProtection) | ||
} | ||
@@ -39,0 +41,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
37773
805
0