Skip to main content
>_ supraj.dev
TOPIC NETWORKING
Reverse Proxy the middleman in front of your app
IN 10 SECONDS

A server (like Nginx, HAProxy, Caddy) placed in front of your applications. It receives client requests, handles SSL termination, compression, and routes traffic to internal backends.

GOTCHA Failing to pass X-Forwarded-For and X-Forwarded-Proto headers makes your backend think all traffic comes from localhost or the proxy's IP.
HOW A REVERSE PROXY FLOWS
01 Client sends a request to https://supraj.dev.
02 Proxy terminates the TLS connection, checks headers and path.
03 Forwarding proxy forwards the request over unencrypted HTTP (or internal TLS) to backend 10.0.1.5:3000.
04 Response proxy buffers the backend response and streams it back to the client.
POKE IT YOURSELF
nginx -t — test Nginx configuration syntax
curl -I -H 'Host: supraj.dev' http://localhost — query proxy locally