You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I needed to access ctx from the Authorizer function. I make a database query in this function and I needed to transfer some values to the main handler. Since ctx cannot be accessed, a DB query needs to be made again in the main handler. I somehow solved my need, but if this becomes a permanent feature, it would be useful for different usage scenarios.
Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord
I guess I have entered some incomplete information about Express.js. You can easily do this by writing your own middleware in Express.js.
Yes, you can do this by writing middleware in Fiber and that's what I did. It would be nice to have this feature in the built-in "basicauth" middleware.
There will only be a small change in the config struct and a few lines of related code will change.
Feature Proposal Description
I needed to access ctx from the Authorizer function. I make a database query in this function and I needed to transfer some values to the main handler. Since ctx cannot be accessed, a DB query needs to be made again in the main handler. I somehow solved my need, but if this becomes a permanent feature, it would be useful for different usage scenarios.
Alignment with Express API
This can be done in Express.js.
HTTP RFC Standards Compliance
This is not an issue related to the http RFC.
API Stability
A feature that could be used in the future.
Feature Examples
Checklist:
The text was updated successfully, but these errors were encountered: