Can I separate my primary middleware from my routes #2440
Answered
by
davidpdrsn
Naginipython
asked this question in
Q&A
-
SummaryThe middleware that includes Cors, Tracing, etc typically take up a lot of space, and I don't like to look at it, so I was wondering if there is anything like the
axum version0.7.1 |
Beta Was this translation helpful? Give feedback.
Answered by
davidpdrsn
Dec 19, 2023
Replies: 1 comment 1 reply
-
You can define a function that takes a router, adds the middleware, and returns the updated router. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Naginipython
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can define a function that takes a router, adds the middleware, and returns the updated router.