Created
December 2, 2019 10:06
-
-
Save mariusoe/663caa791c0964cbc7e39f27c83b7ef3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # | |
# Action for extracting header fields of a HTTP requests | |
# processed by the Java Servlet API. If multiple headers | |
# with the specified name exists, only the first one | |
# will be returned. | |
# | |
# field : String | |
# The name of the header field to extract | |
# | |
# return | |
# The value of the header field with the given name | |
inspectit: | |
instrumentation: | |
actions: | |
a_extract_http_header: | |
imports: | |
- javax.servlet.http.HttpServletRequest | |
input: | |
_arg0: Object | |
field: String | |
value-body: | | |
if (_arg0 instanceof HttpServletRequest) { | |
HttpServletRequest hsr = (HttpServletRequest) _arg0; | |
String header = hsr.getHeader(field); | |
if (header != null) { | |
return header; | |
} | |
} | |
return "<not available>"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment