Ways to do middleware route filter #2961
Unanswered
MaxTechnics
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm working on an api that has a bunch of routes that require user permissions. Up to this point i've done this check in each route (so it has a bunch of duplicate code). I want to move this to a middleware, however following the documentation (https://nitro.build/guide/routing#request-filtering), i'm wondering whether there's a better way to define routes that need the middleware?
Is there a custom props feature in nitro? Or what would be a good way to go about this?
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions