private String stripLeadingAndTrailingSlash(String string) {
    return string.replaceAll("^/|/$", "");
  }
If the string starts or ends with a slash, remove them.
@param string the string to strip.
@return the string with the leading and trailing slash remove.
ambry-api/src/main/java/com/github/ambry/config/FrontendConfig.java