Replies: 1 comment 3 replies
-
There should be enough examples of middleware in our examples repo for you to find something relevant for your use cases: https://github.com/actix/examples/tree/master/middleware. In particular, here is an example where a new response is created and returned: https://github.com/actix/examples/blob/master/middleware/middleware/src/redirect.rs#L50-L60 |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Well, it looks like a simple task I'm trying to accomplish, but somehow it's not easy to achieve.
My motivation is to check the ping of the server before it reaches out to the actual service layer. This can also be useful for tasks like blacklisting and more. I'm looking for functionality similar to Tomcat filters. Anyway, this is my sample code, which doesn't work
main.rs
error :
Beta Was this translation helpful? Give feedback.
All reactions