diff --git a/newrelic-security-api/src/main/java/com/newrelic/api/agent/security/schema/HttpRequest.java b/newrelic-security-api/src/main/java/com/newrelic/api/agent/security/schema/HttpRequest.java index 269f07503..67ad311d1 100644 --- a/newrelic-security-api/src/main/java/com/newrelic/api/agent/security/schema/HttpRequest.java +++ b/newrelic-security-api/src/main/java/com/newrelic/api/agent/security/schema/HttpRequest.java @@ -214,6 +214,13 @@ public String getRoute() { return route; } + public void setRoute(String route){ + String formatedRoute = StringUtils.removeEnd(StringUtils.prependIfMissing(route, StringUtils.SEPARATOR), StringUtils.SEPARATOR); + if(!StringUtils.isEmpty(formatedRoute)) { + this.route = formatedRoute; + } + } + public void setRoute(String segment, boolean isAlreadyServlet) { // remove servlet detected route if another framework detected; if (isAlreadyServlet){