Skip to content

Commit

Permalink
fix: route deprecation warning - fixes fastify#229
Browse files Browse the repository at this point in the history
  • Loading branch information
pgbross committed Sep 12, 2023
1 parent cf8b6cd commit 036c939
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async function fastifyHelmet (fastify, options) {

fastify.addHook('onRequest', async (request, reply) => {
/* istanbul ignore next */
const { helmet: routeOptions } = request.routeConfig || request.context.config
const { helmet: routeOptions } = request.routeOptions.config || request.context.config

if (typeof routeOptions !== 'undefined') {
const { enableCSPNonces: enableRouteCSPNonces, skipRoute, ...helmetRouteConfiguration } = routeOptions
Expand Down

0 comments on commit 036c939

Please sign in to comment.