-
Notifications
You must be signed in to change notification settings - Fork 40
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
One should be able to add middlewares to static and serve routes #137
Comments
Hi @odahcam, you case use custom middleware the same way as in pure express application. |
At first I got a bit confused the So I just remembered my motivation for this issue: change the response body and headers. I'd like to capture the response of the ViteExpress adapter, and only this, that means my middleware would be chained to the ViteExpress adapter and would never be called unless the ViteExpress adapter runs. And I think this makes me feel like an API more similar to Remix Express adapter would make this even more flexible and powerful. |
Hi @odahcam, I admit to the mistake of writing When it comes to having some kind of hook/functions that you can specify that run when Let me know if you would like to propose some solution or maybe just provide some more detailed process that you would want to cover. |
Sometimes you may want to perform some security like CSRF or other things and custom middlewares can help with that.
The text was updated successfully, but these errors were encountered: