Notes from the build room

Better software starts with better questions.

Ideas and field notes on engineering, design, and the architecture behind software that lasts. Written for people who care about how things are made.

A little curiosity goes a long way.
The journal

Latest articles

Forward remote IP address from Nginx to a Spring Boot application

Currently, my preferred way to set up a Spring Boot based web application in production is to use a Reverse Proxy to route traffic to the corresponding backed applications. In this context, I really like Nginx as a fast and reliable web server with low memory footprint. The problem though, when using a reverse proxy is: when requests are forwarded to the backend applications, the remote IP address of the client is being replaced by the IP address of the reverse proxy server (e.g. 127.0.0.1 when installed on the same server).

To log requests and analyze user and behavioral patterns, it is beneficial to be able to use the remote IP address. This post explains how this can be achieved easily using Nginx.

Continue reading