Consider using middlewares more efficiently #527
m4tx
started this conversation in
Ideas and feature requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Right now we're doing
IntoCotResponseandIntoErrorResponseon each middleware that's being added to the project. While the overhead might not be terrible, it should be measured and if it turns out to be significant, it might be worth considering if changing the APIs is needed. One idea is to make sure that whatever gets passed intomiddleware()already has properResponseandErrortypes, and provide some conversion functionalities if not.All reactions