Can't get the middleware example to work #2400
Answered
by
robjtede
beowulf1416
asked this question in
Q&A
-
I copied the example from the page https://actix.rs/docs/middleware/ about creating a middleware but I cannot get it to work. The |
Beta Was this translation helpful? Give feedback.
Answered by
robjtede
Oct 11, 2021
Replies: 1 comment
-
I suspect you're using the v4 beta which uses a slightly tweaked Service trait. See docs for it here: https://docs.rs/actix-service/2.0.1/actix_service/trait.Service.html. Also read the build-in middleware for some extra guidance: https://github.com/actix/actix-web/tree/master/src/middleware. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
beowulf1416
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I suspect you're using the v4 beta which uses a slightly tweaked Service trait. See docs for it here: https://docs.rs/actix-service/2.0.1/actix_service/trait.Service.html. Also read the build-in middleware for some extra guidance: https://github.com/actix/actix-web/tree/master/src/middleware.