diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-12-12 17:49:10 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-12-12 17:49:10 +0100 |
commit | cb45296377972bafc3d283a8dcf00c7ebb976551 (patch) | |
tree | a6f26bc93d42f04e83b6f7aa291413b6d65869f5 /web/src/js/flow | |
parent | 01fa5d3f07d26d52e5ad7eef139e1ed6f9b7dae1 (diff) | |
download | mitmproxy-cb45296377972bafc3d283a8dcf00c7ebb976551.tar.gz mitmproxy-cb45296377972bafc3d283a8dcf00c7ebb976551.tar.bz2 mitmproxy-cb45296377972bafc3d283a8dcf00c7ebb976551.zip |
web: implement filters
Diffstat (limited to 'web/src/js/flow')
-rw-r--r-- | web/src/js/flow/utils.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/web/src/js/flow/utils.js b/web/src/js/flow/utils.js index e54f7c59..988629b9 100644 --- a/web/src/js/flow/utils.js +++ b/web/src/js/flow/utils.js @@ -22,6 +22,16 @@ var _MessageUtils = { message._headerLookups[regex] = header ? header[1] : undefined; } return message._headerLookups[regex]; + }, + match_header: function(message, regex){ + var headers = message.headers; + var i = headers.length; + while(i--){ + if(regex.test(headers[i].join(" "))){ + return headers[i]; + } + } + return false; } }; |