Forum Discussion

SteveD1979's avatar
SteveD1979
Icon for Cirrostratus rankCirrostratus
Jun 11, 2024

Rename header in response and keep value

Hi hopefully this is really easy i just didnt see anything.  I just need to take a request header that comes in and rename it in a response header keeping the same value.

 

Header named email has a value of sdaley@company.com needs to be sent in the response to the sender as email allowed with the value sdaley@company.com

  • Hi, 

    you just need an iRule in the following sequence : 

    1- save the Header value that comes in HTTP Request in a variable : 
             set Req_header [HTTP::header value "email"]

    2- Then insert Header value again under HTTP_Response event again. 

     

    Please have a look in this article : https://community.f5.com/discussions/technicalforum/irule-to-add-the-server-header-in-the-http-response-please-help/113097

    look at Kai_Wilke reply >> it will give u an insight of how doing this. 

    Let me know if it doesn't worked with you.