private void appendMandatory(String name, String value, String defaultValue, boolean predicate,
            String failureMessage) {
        String valToSet = value;
        if (value == null || !predicate) {
            valToSet = defaultValue;

            if (!predicate && config.isErrorOnCorsFailure()) {
                doFailure(failureMessage);
            }
        }

        responseHeaders.put(name, valToSet);
    }
@return if the request is simple, as defined by CORS spec
plugins/cors-policy/src/main/java/io/apiman/plugins/cors_policy/CorsConnector.java