How to Use Fiddler & Charles Proxy to monitor the NextJS app server backend

60 Views Asked by At

How do I proxy the Nextjs app router using something like Fiddler or Charles Proxy,

I'm NOT talking about the Nextjs config rewrite functionality.

I have a Nextjs 14.0 app (with the new app router) with Server Components and Api routes that make requests to several other 3rd party api's to fetch data. I would like to intercept those requests (specifically while in local development) so that I could monitor / troubleshoot the requests (to see if the request is sent with all the correct parameters).

I could easily do this in Express app by hooking up the proxy server to the incoming requests. I couldn't find any docs on how to do this in Nextjs app router.

Using Charles Proxy: I was able to monitor the request coming in from the client (browser) to the app server but couldn't see any requests going out from the server to the 3rd party api's on the backend

Using Charles Proxy: I was able to monitor the request coming in from the client (browser) to the app server but couldn't see any requests going out from the server to the 3rd party api's on the backend

0

There are 0 best solutions below