We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfff279 commit 07037f0Copy full SHA for 07037f0
index.js
@@ -4,6 +4,10 @@ const fp = require('fastify-plugin')
4
const verifyBearerAuthFactory = require('./lib/verify-bearer-auth-factory')
5
const { FST_BEARER_AUTH_INVALID_HOOK, FST_BEARER_AUTH_INVALID_LOG_LEVEL } = require('./lib/errors')
6
7
+/**
8
+ * Hook type limited to 'onRequest' and 'preParsing' to protect against DoS attacks.
9
+ * @see {@link https://github.com/fastify/fastify-auth?tab=readme-ov-file#hook-selection | fastify-auth hook selection}
10
+ */
11
const validHooks = new Set(['onRequest', 'preParsing'])
12
13
function fastifyBearerAuth (fastify, options, done) {
0 commit comments