UNPKG

fastify-allow

Version:

Fastify plugin that adds an Allow header with all registered methods to GET and HEAD responses. See https://datatracker.ietf.org/doc/html/rfc7231#section-7.4.1

9 lines (8 loc) 344 B
import { FastifyInstance, FastifyPluginOptions } from "fastify"; export interface AllowOptions extends FastifyPluginOptions { send405?: boolean; send405ForWildcard?: boolean; } declare function plugin(fastify: FastifyInstance, opts: AllowOptions, done: () => void): void; declare const _default: typeof plugin; export default _default;