# Traefik Reverse Proxy: How to debug middleware activity?

**URL:** <https://community.traefik.io/t/traefik-reverse-proxy-how-to-debug-middleware-activity/20601>\
**Category:** Traefik v2\
**Tags:** middleware\
**Created:** [November 28, 2023, 4:38pm UTC](https://community.traefik.io/t/traefik-reverse-proxy-how-to-debug-middleware-activity/20601 "2023-11-28T16:38:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yoki](https://avatars.discourse-cdn.com/v4/letter/y/ecc23a/32.png) [@Yoki](https://community.traefik.io/u/Yoki)\
**Post date:** [November 28, 2023, 4:38pm UTC](https://community.traefik.io/t/traefik-reverse-proxy-how-to-debug-middleware-activity/20601/1 "2023-11-28T16:38:38Z")

</div>

Hi there,

Simple question: how to debug what Traefik does regarding middleware operations, like `replacepathregex` for example.  
I've struggled with a case that I need to check in logs but could not find anything about it...

What I understand is:

- Traefik shows the incoming request (with path, and without host and body)
- once the request reaches Traefik, there is no way to know if the regex happened but to use external tools between Traefik and the backend service

Am I right ? Or do you have any advice or a way to go with debugging this part ?

Thank you all,

---

<div class="post-metadata">

**Author:** ![svx](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/svx/32/6429_2.png) [@svx](https://community.traefik.io/u/svx)\
**Post date:** [November 30, 2023, 3:24pm UTC](https://community.traefik.io/t/traefik-reverse-proxy-how-to-debug-middleware-activity/20601/2 "2023-11-30T15:24:05Z")

</div>

Hi @Yoki,

thanks for your interest in Traefik!

Maybe you could set up a `catchall` router catchall with the middleware, and expose a `traefik/whoami`container.

And then you could find the information in the displayed headers and paths.

(I did not test that.)

---

<div class="post-metadata">

**Author:** ![Yoki](https://avatars.discourse-cdn.com/v4/letter/y/ecc23a/32.png) [@Yoki](https://community.traefik.io/u/Yoki)\
**Post date:** [December 4, 2023, 10:14am UTC](https://community.traefik.io/t/traefik-reverse-proxy-how-to-debug-middleware-activity/20601/3 "2023-12-04T10:14:05Z")

</div>

Hi @svx !

First of all, thanks a lot for your answer.  
Well, even if I hoped there was an embed solution (like a configuration) inside Traefik, I think it would be a great (last) option to try 🙂

Thanks !
