Question description
In Express, it's possible to dangle any sort of custom methods or properties from the request/response objects via middleware. I can't see anything in the documentation of how to do this in Fiber.
For instance, I want to write middleware that deals with some authentication that gives me an API in my route handlers that allows me to check for permissions or call an upstream service, how would this be done?
Thanks for opening your first issue here! 馃帀 Be sure to follow the issue template!
We are planning to add a feature to extend the Ctx struct, but this will be released in v2.
For now you could use a function called Locals for passing data between middlewares.
Click here for an example, does this help?
Most helpful comment
We are planning to add a feature to extend the Ctx struct, but this will be released in v2.
For now you could use a function called Locals for passing data between middlewares.
Click here for an example, does this help?