Improve logging in IngestRestService to log real client IP if behind a proxy

Description

IngestRestService logs the client IP of a CA ingesting:

2013-09-09 14:05:09 INFO (IngestRestService:739) - Received new request from 127.0.0.1 to ingest a zipped mediapackage

but as shown above if the CA is behind a proxy, then you get the IP of the proxy which is less helpful.

Similar to MH-8616, we should log the client IP behind the proxy through the X-Forwarded-For header, e.g. code example from UserTrackingRestService.java:

//MH-8616 the connection might be via a proxy
String clientIP = request.getHeader("X-FORWARDED-FOR");

if (clientIP == null) {
clientIP = request.getRemoteAddr();
}

Steps to reproduce

None

Status

Assignee

Tobias Wunden

Reporter

Stephen Marquard

Criticality

None

Tags (folksonomy)

None

Components

Fix versions

Affects versions

Priority

Configure