From 6012ee731615d8b25658b948bb52042bbb7ac5cd Mon Sep 17 00:00:00 2001 From: Axel Uhl Date: Thu, 15 May 2025 09:59:03 +0200 Subject: [PATCH] use HttpClientUtils.getClientIP in ProxiedRemoteServiceServlet to properly log the true client IP --- java/com.sap.sse.gwt/META-INF/MANIFEST.MF | 3 ++- .../com/sap/sse/gwt/server/ProxiedRemoteServiceServlet.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/java/com.sap.sse.gwt/META-INF/MANIFEST.MF b/java/com.sap.sse.gwt/META-INF/MANIFEST.MF index dbcb6fe5fc8..db4eac21e38 100644 --- a/java/com.sap.sse.gwt/META-INF/MANIFEST.MF +++ b/java/com.sap.sse.gwt/META-INF/MANIFEST.MF @@ -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, diff --git a/java/com.sap.sse.gwt/src/com/sap/sse/gwt/server/ProxiedRemoteServiceServlet.java b/java/com.sap.sse.gwt/src/com/sap/sse/gwt/server/ProxiedRemoteServiceServlet.java index 7f1db8d98f7..208e9360d76 100644 --- a/java/com.sap.sse.gwt/src/com/sap/sse/gwt/server/ProxiedRemoteServiceServlet.java +++ b/java/com.sap.sse.gwt/src/com/sap/sse/gwt/server/ProxiedRemoteServiceServlet.java @@ -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 {