Forum Discussion
Accessing Custom Request Header fields inserted from Back end Application
Is there a way to access Custom HTTP Request Header fields that are inserted from a backend application using iRules? I am accessing a web page from the webserver that is displaying all the Request Header fields - including some custom header fields created by this application. So the header fields are present at the time this page renders.
I have been trying to use iRules to access these custom header fields, but when I dump the header, I only see the basic request header fields, none of the custom fields. I am assuming this is the case because I am querying the header from the HTTP_REQUEST event, and that this event is firing before that backend application page has inserted the custom fields into the header.
So, my question is, is there an event where I can query the header and pull these fields that the application inserted?
- JRahmAdmin
if the backend application is responding back through the BIG-IP, then you should be able to access these headers in the HTTP_RESPONSE event.
- Steve_W_85246Nimbostratus
Thanks for responding. Yes, the backend application is responding back through BIG-IP, but when querying the header in the HTTP_RESPONSE event, I only the see typical header fields:
But none of the custom fields.
- JRahmAdmin
if you take a packet capture on the server side vlan, do you see the headers on the wire?
- Kevin_StewartEmployee
Try this:
when HTTP_REQUEST { log local0. "Request URI = [HTTP::uri]" foreach x [HTTP::header names] { log local0. "Request header($x) = [HTTP::header $x]" } } when HTTP_RESPONSE { log local0. "Response status = [HTTP::status]" foreach x [HTTP::header names] { log local0. "Response header($x) = [HTTP::header $x]" } }
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com