Skip to content

refactor: remove usage of deprecated request.routeConfig #289

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

inyourtime
Copy link

@inyourtime inyourtime commented Jun 26, 2025

request.routeConfig was removed in Fastify v5
ref. https://fastify.dev/docs/latest/Guides/Migration-Guide-V5/#streamlined-access-to-route-definition

Checklist

@@ -135,6 +133,7 @@ async function buildHelmetOnRoutes (request, reply, configuration, enableCSP) {

// Helmet forward a typeof Error object so we just need to throw it as is.
function done (error) {
/* c8 ignore next */
Copy link
Author

@inyourtime inyourtime Jun 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Helmet v8.1.0 (see PR), errors are now thrown directly instead of being passed to a callback.
This makes any error handling logic in the callback unreachable.
not sure is this ok?
or simply:

function done () {}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant