void parseBrowserUserAgents(String userAgents) {
    String[] agentsArray = userAgents.split(",");
    browserUserAgents = new HashSet<>();
    for (String patternString : agentsArray) {
      browserUserAgents.add(Pattern.compile(patternString));
    }
  }
This filter provides protection against cross site request forgery (CSRF) attacks for REST APIs.
Enabling this filter on an endpoint results in the requirement of all client to send a particular
(configurable) HTTP header with every request. In the absense of this header the filter will
reject the attempt as a bad request.
hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/filter/RestCsrfPreventionFilter.java