Page MenuHomePhabricator
Paste P14571

Command-Line Input
ActivePublic

Authored by CDanis on Mar 2 2021, 9:48 PM.
if (options.headers_to_fields) {
_.forEach(options.headers_to_fields, (field, header) => {
if (
(_.has(schema, fieldNameToSchemaName(field)) ||
(_.has(schema, fieldNameToSchemaName(parentOfField(field))) &&
_.get(schema, fieldNameToSchemaName(parentOfField(field)) + '.type') === 'object')) &&
!_.has(event, field) &&
context.req.headers[header]
) {
_.set(
event, field,
context.req.headers[header].substring(0, maxHeaderLength)
);
logger.trace(`Set ${field} in ${eventRepr(event, context)}`);
}
});
}

Event Timeline

CDanis updated the paste's language from autodetect to js.Mar 2 2021, 9:49 PM