Skip to content

Instantly share code, notes, and snippets.

@neu5ron
Last active January 9, 2019 11:18
Show Gist options
  • Save neu5ron/cbfca0dfc42b1d6c96cd321d687e5495 to your computer and use it in GitHub Desktop.
Save neu5ron/cbfca0dfc42b1d6c96cd321d687e5495 to your computer and use it in GitHub Desktop.
Add Additional HTTP Header fields to Bro http logs
module HTTP;
# Add additional HTTP Headers
redef record Info += {
#Origin "Origin"
origin: string &log &optional;
};
event http_header(c: connection, is_orig: bool, name: string, value: string) &priority=5
{
if ( is_orig ) # client headers
{
if ( name == "ORIGIN" )
c$http$origin = value;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment