use HttpClientUtils.getClientIP in ProxiedRemoteServiceServlet to properly log the true client IP

This commit is contained in:
Axel Uhl committed 2025-05-15 09:59:03 +02:00
1 parent 8a1f8f1d6c
commit 6012ee7316
2 files changed
+4 -2

No files matched your search

+2 -1
View File
@@ -11,7 +11,8 @@ Require-Bundle: com.google.gwt.user;bundle-version="2.10.0";resolution:=optional
com.sap.sse.common,
com.sap.sse.filestorage,
com.sap.sse.security.common,
elemental2;bundle-version="1.1.0"
elemental2;bundle-version="1.1.0",
com.sap.sse
Bundle-ActivationPolicy: lazy
Web-ContextPath: /gwt-base
Import-Package: com.sap.sse.security,
@@ -27,6 +27,7 @@ import com.sap.sse.common.HttpRequestHeaderConstants;
import com.sap.sse.common.TimePoint;
import com.sap.sse.common.Util.Triple;
import com.sap.sse.common.impl.MillisecondsTimePoint;
import com.sap.sse.util.HttpRequestUtils;
/**
* Using GWT in a proxyfied environment can be tricky and leads to strange errors
@@ -151,7 +152,7 @@ public abstract class ProxiedRemoteServiceServlet extends RemoteServiceServlet {
if (startAndEndOfProcessing == null) {
// the processing time annotation happens only for POST requests in the doPost-->processCall-->afterProcessCall method chain
if (req.getMethod().equals("POST")) {
logger.warning("A request with method POST from address "+req.getRemoteAddr()
logger.warning("A request with method POST from address "+HttpRequestUtils.getClientIP(req)
+" was processed. No timing information available. Perhaps there was an IncompatibleRemoteServiceException thrown, so the call was not processed.");
}
} else {