private void appendOptional(String name, String value, boolean predicate, String failureMessage) {
        if (value != null && predicate) {
            responseHeaders.put(name, value);
        } else {
            if (config.isErrorOnCorsFailure() && failureMessage != null) {
                doFailure(failureMessage);
            }
        }
    }
@return if the request is simple, as defined by CORS spec
plugins/cors-policy/src/main/java/io/apiman/plugins/cors_policy/CorsConnector.java