virto-network / valor

Create HTTP APIs with a plugin system that runs in the server and the browser.
GNU General Public License v3.0
9 stars 8 forks source link

Middleware support #13

Open olanod opened 3 years ago

olanod commented 3 years ago

Plugins could also be middlewares that modify and pass along the current request or response. For Rust plugins I imagine the #[vlugin] macro being smart enough to detect the that the annotated function should be a middleware based on the method signature. i.e.

#[vlugin]
pub fn check_auth(&mut Request) { ... }