How to limit body length only given http path? #2243
-
I know axum can limit body easily but I want to enlarge the body limit only specific path. Could you give me any advice for me? |
Beta Was this translation helpful? Give feedback.
Answered by
davidpdrsn
Sep 28, 2023
Replies: 1 comment 3 replies
-
Just add the middleware for that path specifically. See https://docs.rs/axum/latest/axum/middleware/index.html#applying-middleware for relevant links. |
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
Yes that's possible. Just only add the middleware where you need it