summaryrefslogtreecommitdiffstats
path: root/cadi
diff options
context:
space:
mode:
authorSmokowski, Steve (ss835w) <ss835w@us.att.com>2018-11-27 13:02:13 -0500
committerSmokowski, Steve (ss835w) <ss835w@us.att.com>2018-11-27 13:02:13 -0500
commit43572325dfda87c7c3d4725c9c33722cf5072de0 (patch)
treef97f938d698a8f3813508b7621f0204b47e8f8b7 /cadi
parente92832a4f8dbcc18dff57ff09232c5b75687742e (diff)
Update URL Logic
Update logic to fetch the path of request Issue-ID: AAF-645 Change-Id: I4ba4f3623adc14add20555f3c50e4e81376689d7 Signed-off-by: Smokowski, Steve (ss835w) <ss835w@us.att.com>
Diffstat (limited to 'cadi')
-rw-r--r--cadi/core/src/main/java/org/onap/aaf/cadi/filter/CadiApiEnforcementFilter.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/cadi/core/src/main/java/org/onap/aaf/cadi/filter/CadiApiEnforcementFilter.java b/cadi/core/src/main/java/org/onap/aaf/cadi/filter/CadiApiEnforcementFilter.java
index 495131b9..e32b30d0 100644
--- a/cadi/core/src/main/java/org/onap/aaf/cadi/filter/CadiApiEnforcementFilter.java
+++ b/cadi/core/src/main/java/org/onap/aaf/cadi/filter/CadiApiEnforcementFilter.java
@@ -98,7 +98,11 @@ public class CadiApiEnforcementFilter implements Filter {
public void doFilter(ServletRequest req, ServletResponse resp, FilterChain fc) throws IOException, ServletException {
HttpServletRequest hreq = (HttpServletRequest)req;
final String meth = hreq.getMethod();
- final String path = hreq.getContextPath()+hreq.getPathInfo();
+ String path = hreq.getContextPath()+hreq.getPathInfo();
+
+ if(path == null || path.isEmpty() || "null".equals(path))
+ path = hreq.getRequestURI().substring(hreq.getContextPath().length());
+
List<String> list = publicPaths.get(meth);
if(list!=null) {
for( String p : publicPaths.get(meth)) {