function filterBlacklistedHeaders(headers) {
        return Object.keys(headers)
            .filter(function (key) {
                return globalOptions.headerBlacklist.indexOf(key) === -1;
            })
            .reduce(function (acc, header) {
                acc[header] = headers[header];
                return acc;
            }, {});
    }
Returns a new object containing only the whitelisted headers.
@param {Object} headers The original object of header names and
values.
@param {string[]} globalOptions.headerWhitelist An array of
strings representing the whitelisted header names to keep in the
output object.

Generated by Trelent