diff options
author | Jonathan Gathman <jonathan.gathman@att.com> | 2018-11-28 12:49:11 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-11-28 12:49:11 +0000 |
commit | 2ee44a528bf12720072575188eabd93ad4ee90fc (patch) | |
tree | 953f98d4cc5b0bc54c35386656d6c9eb55937537 /cadi/core | |
parent | 264cb20ce5f31317919d5c49394cb3d482d5dbcd (diff) | |
parent | 43572325dfda87c7c3d4725c9c33722cf5072de0 (diff) |
Merge "Update URL Logic"
Diffstat (limited to 'cadi/core')
-rw-r--r-- | cadi/core/src/main/java/org/onap/aaf/cadi/filter/CadiApiEnforcementFilter.java | 6 |
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)) { |