Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow specifying middleware for individual and groups of Operations (Action, Query) on the server #2396

Open
Martinsos opened this issue Dec 4, 2024 · 0 comments
Labels
enhancement New feature or request hm Requires more thought server

Comments

@Martinsos
Copy link
Member

If you want to execute some logic that is common for a group of Operations (and maybe also APIs), there is no simple way to do it -> we do have customMiddleware for APIs and api namespaces, but not for Operations or groups of Operations. You might want this to do some auth checks, maybe check the role of the user, or maybe inject some additional information that all of these need, ... .

So, what we want is enable users to provide middleware that executes for a group of Operations / APIs. Maybe we can specify this by grouping them somehow, or by specifying the route prefix (although for Operations, their route is implementation detail right now, so something would have to change there). We should of course consider if we can utilize existing expressjs functionality vs reimplementing too much of this on our own, what makes more sense.

@Martinsos Martinsos added enhancement New feature or request hm Requires more thought server labels Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hm Requires more thought server
Projects
None yet
Development

No branches or pull requests

1 participant