Closed remidewitte closed 6 months ago
You should be able to use the 'preValidation' hook like here: https://github.com/i18next/i18next-http-middleware/blob/master/example/fastify/index.js#L28
Regarding the plugin usage, feel free to suggest a PR.
@adrai Many thanks for your answer. I did not notice the alternative usage with addHook that shall work indeed.
I am happy to suggest a PR if the addHook does not work.
https://github.com/i18next/i18next-http-middleware/blob/90f5a482db84ea8597b9d743e1ce6f0018323ee2/lib/index.js#L122
Use-case :
Hook could be changed to : 'preValidation' It could also be configurable when the plugin is registered.