diff options
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/onap/sdc/dcae/controller/proxy/DcaeProxy.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/org/onap/sdc/dcae/controller/proxy/DcaeProxy.java b/src/main/java/org/onap/sdc/dcae/controller/proxy/DcaeProxy.java index 84b6918..4900f27 100644 --- a/src/main/java/org/onap/sdc/dcae/controller/proxy/DcaeProxy.java +++ b/src/main/java/org/onap/sdc/dcae/controller/proxy/DcaeProxy.java @@ -43,14 +43,16 @@ public class DcaeProxy extends ProxyServlet { log.error("Unexpected FE request logging error :", e); } String uri = request.getRequestURI(); - uri = uri.replace("/dcaeProxy", ""); + uri = uri.replaceFirst("/dcaed", "/dcae"); // replacing the new FE context (/dcaed) with BE context (/dcae) + uri = uri.replace("/dcaeProxy", ""); // removing the proxy from the request String query = request.getQueryString(); StringBuilder url = new StringBuilder(); url.append(beHostUrl).append(uri); - if(null != query) - url.append("?").append(query); + if(null != query){ + url.append("?").append(query); // restoring all query params if tsuch exists + } String urlString = url.toString(); - log.info("Proxy outgoing request={}", urlString); + log.info("New FE Proxy outgoing request={}", urlString); return urlString; } |