@fastify/csrf-protection
Advanced tools
Comparing version 6.1.0 to 6.2.0
{ | ||
"name": "@fastify/csrf-protection", | ||
"version": "6.1.0", | ||
"version": "6.2.0", | ||
"description": "A plugin for adding CSRF protection to Fastify.", | ||
@@ -38,3 +38,3 @@ "main": "index.js", | ||
"@fastify/pre-commit": "^2.0.2", | ||
"@fastify/secure-session": "^5.0.0", | ||
"@fastify/secure-session": "^6.0.0", | ||
"@fastify/session": "^10.0.0", | ||
@@ -44,6 +44,6 @@ "@types/node": "^18.0.0", | ||
"proxyquire": "^2.1.3", | ||
"sinon": "^14.0.0", | ||
"sinon": "^15.0.0", | ||
"standard": "^17.0.0", | ||
"tap": "^16.0.0", | ||
"tsd": "^0.24.1" | ||
"tsd": "^0.25.0" | ||
}, | ||
@@ -50,0 +50,0 @@ "pre-commit": [ |
@@ -19,3 +19,3 @@ /// <reference types="node" /> | ||
options?: fastifyCsrfProtection.CookieSerializeOptions | ||
): FastifyReply; | ||
): string; | ||
} | ||
@@ -22,0 +22,0 @@ } |
import Fastify from 'fastify' | ||
import FastifyCookie from '@fastify/cookie' | ||
import FastifyCsrfProtection, { FastifyCsrfOptions } from '..' | ||
import { expectError, expectDeprecated } from 'tsd' | ||
import { expectError, expectDeprecated, expectType } from 'tsd' | ||
import FastifySession from '@fastify/session' | ||
@@ -17,3 +17,5 @@ | ||
handler: async (req, reply) => { | ||
return reply.generateCsrf() | ||
const token = reply.generateCsrf() | ||
expectType<string>(token) | ||
return token | ||
} | ||
@@ -20,0 +22,0 @@ }) |
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
31956
639