It is caused by the fact that the code calls request.getRemoteAddr() which contains actually the reverse proxy's IP