Inspect proxied requests from Nginx to Kestrel with Mitmproxy
Inspect proxied requests from Nginx to Kestrel with Mitmproxy In previous blog posts, we saw how to proxy requests to an ASP NET Core application using Nginx . We saw that request headers also can be proxied with proxy_set_header In order to ease development, we need to be able to debug the values to verify that they are what we expect. Today we will see two methods to inspect the proxied requests. This post will be composed by two parts: Nginx location routing Nginx variable debugging Nginx proxied request debug with Mitmproxy 1 Nginx location routing Considering the following configuration of our server: server { listen 80; location / { proxy_pass http://localhost:5000; } location /api/ { proxy_pass http://localhost:5001/; } } If we want to check whether our location routes are properly configured, we can short circuit the proxy_pass with return and use curl to check whether the location is properly selected. server { listen ...