Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P14571
Command-Line Input
Active
Public
Actions
Authored by
CDanis
on Mar 2 2021, 9:48 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F34132242: Command-Line Input
Mar 2 2021, 9:48 PM
2021-03-02 21:48:49 (UTC+0)
Subscribers
None
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
created this paste.
Mar 2 2021, 9:48 PM
2021-03-02 21:48:49 (UTC+0)
CDanis
updated the paste's language from
autodetect
to
js
.
Mar 2 2021, 9:49 PM
2021-03-02 21:49:19 (UTC+0)
Log In to Comment