Forum Discussion
Replace an header authorization request with policy or iRule doesn't work ...
- Apr 29, 2021
Try below. Modify the names of the header if needed. You can enable logging to see if it's replacing as expected.
when HTTP_REQUEST { if { [HTTP::header exists "X-epsilon-Authorization"] } { set value [HTTP::header value X-epsilon-Authorization] HTTP::header remove X-epsilon-Authorization HTTP::header insert Authorization $value } else { return } foreach aHeader [HTTP::header names] { # log local0. "$aHeader: [HTTP::header value $aHeader]" } }
Hi SanjayP,
Thanks for reply !
I try the irule but that return an error: "01070151:3: Rule [/Common/A_irule] error: /Common/A_irule:2: error: [parse error: PARSE syntax 33 {syntax error in expression " HTTP::header exists X-mafrenchbank-Authorization ": variable references require preceding $}][{ HTTP::header exists X-mafrenchbank-Authorization }]"
Thanks
It works !!
Just the hooks were missing [HTTP::header exists "X-epsilon-Authorization"]
The irule run perfectly and the value of Header has been changed.
Thanks a lot and have a good day !
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