Visit Website

This plugin helps developers protect their Fastify server against CSRF attacks. In order to fully protect against CSRF, developers should study Cross-Site Request Forgery Prevention Cheat Sheet in depth. See also pillarjs/understanding-csrf as a good guide. Security Disclaimer: Securing applications against CSRF is a developer responsibility and it should not be fully trusted to any third party modules. We do not claim that this module is able to protect an application without a clear study of CSRF, its impact and the needed mitigations. @fastify/csrf-protection provides a series of utilities that developers can use to secure their application. We recommend using @fastify/helmet to implement some of those mitigations. Security is always a tradeoff between risk mitigation, functionality, performance, and developer experience. As a result, we will not consider a report of a plugin default configuration option as a security vulnerability that might be unsafe in certain scenarios as long as this module provides a way to provide full mitigation through configuration. Install: npm i @fastify/csrf-protection Usage: Use with @fastify/cookie If you use @fastify/csrf-prote

ALTERNATIVES