@piggly/fastify-chassis
Version:
An ESM/CommonJS toolkit to help you to do common operations in your back-end applications with Fastify and NodeJS.
18 lines (17 loc) • 651 B
text/typescript
import type { FastifyRequest, FastifyReply } from 'fastify';
import type { CSRFTokenService } from '../services';
/**
* CSRFHeaderIssuerRoute is a route that issues a CSRF token as a header.
*
* It will return a 204 status code and a CSRF token as a header.
*
* @param {Object} deps
* @param {CSRFTokenService} deps.CSRF_SERVICE
* @param {string} [header] The header name.
* @returns Route handler.
* @since 7.0.0
* @author Caique Araujo <caique@piggly.com.br>
*/
export declare const CSRFHeaderIssuerRoute: (deps: {
CSRF_SERVICE: CSRFTokenService;
}, header?: string) => (request: FastifyRequest, reply: FastifyReply) => Promise<any>;