Update URL Logic
[aaf/authz.git] / cadi / core / src / main / java / org / onap / aaf / cadi / filter / CadiApiEnforcementFilter.java
index 495131b..e32b30d 100644 (file)
@@ -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)) {