Forum Discussion
Marco_C__259700
Nimbostratus
Apr 18, 2016Replacing an Http header parameter name with iRule
Hi, I'm new with iRules,
Due to a customer requirement, we need to replace the name of a header parameter from "x-up-calling-line-id" to "msisdn". Also, all the requests that come with this parameter arrive exclusively from port 80.I've been checking related questions but I still have some doubts.
Anyway, this is the iRule I've come up with:
when HTTP_REQUEST {
if { [TCP::local_port] == 80}{
if {[HTTP::header exists x-up-calling-line-id]}{
HTTP::header insert msisdn [HTTP::header $x-up-calling-line-id]
HTTP::header remove x-up-calling-line-id
}
}
}
Can you please help me check if it is ok? Or is there an easier way to do it? Thank you very much.
2 Replies
Sort By
- ekaleido
Cirrus
Maybe....
when HTTP_REQUEST {
- Stanislas_Piro2
Cumulonimbus
Hi,
if the irule is assigned only to VS on HTTP port, you do not need to filter by local_port...
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects