Skip to content
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

Using Fastify 4.23.0 get deprecated "request.routeConfig" warnings #229

Closed
2 tasks done
pgbross opened this issue Sep 12, 2023 · 4 comments · Fixed by #230
Closed
2 tasks done

Using Fastify 4.23.0 get deprecated "request.routeConfig" warnings #229

pgbross opened this issue Sep 12, 2023 · 4 comments · Fixed by #230
Labels
good first issue Good for newcomers

Comments

@pgbross
Copy link
Contributor

pgbross commented Sep 12, 2023

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Fastify version

4.23.0

Plugin version

11.0.0

Node.js version

20.3.1

Operating system

Linux

Operating system version (i.e. 20.04, 11.3, 10)

Fedora 39

Description

With Fastify 4.23.0 get [FSTDEP016] FastifyDeprecation: You are accessing the deprecated "request.routeConfig" property. Use "request.routeOptions.config" instead. Property "req.routeConfig" will be removed in fastify@5` warnings.

This arises in `fastify.addHook('onRequest'...) where it looks for helmet specific config on the route.

Applying the suggested change in the deprecation warning eliminates the warning.

Steps to Reproduce

Simply require the @fastify/helmet plugin and observe the server messages in a terminal console.

Expected Behavior

No deprecation warnings.

@Eomm
Copy link
Member

Eomm commented Sep 12, 2023

Thanks for reporting!
Would you like to send a Pull Request to address this issue?

@Eomm Eomm added the good first issue Good for newcomers label Sep 12, 2023
pgbross added a commit to pgbross/fastify-helmet that referenced this issue Sep 12, 2023
pgbross added a commit to pgbross/fastify-helmet that referenced this issue Sep 12, 2023
@pgbross
Copy link
Contributor Author

pgbross commented Sep 12, 2023

Thanks for reporting! Would you like to send a Pull Request to address this issue?

Sure - done in #230

@sefakpsz
Copy link

sefakpsz commented Aug 13, 2024

I didn't work for me at first but trying again with "--save-dev" worked for me.

@Eomm
Copy link
Member

Eomm commented Aug 14, 2024

This issue is 1yo. Please open a new detailed issue adding a Minimal, Reproducible Example.

@fastify fastify locked as resolved and limited conversation to collaborators Aug 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants