private void stripHeaders(HeaderMap headers, SimpleHeaderPolicyDefBean config, ApplyTo applyTo) {
        for (Map.Entry<String, String> header : headers) {
            if (config.getKeyRegex(applyTo).matcher(header.getKey()).matches()) {
                headers.remove(header.getKey());
            }

            if (config.getValueRegex(applyTo).matcher(header.getValue()).matches()) {
                headers.remove(header.getKey());
            }
        }
    }
Set, overwrite and/or delete headers on request, response or both, with pattern matching available.

@author Marc Savy {@literal <msavy@redhat.com>}
plugins/simple-header-policy/src/main/java/io/apiman/plugins/simpleheaderpolicy/SimpleHeaderPolicy.java