Forum Discussion

Albert__Tase_70's avatar
Albert__Tase_70
Icon for Nimbostratus rankNimbostratus
Mar 13, 2009

http header inserts

I need the following irules to erase the icomming header and then insert.

 

 

when HTTP_REQUEST {

 

if {[HTTP:header]exists remove it and insert the following

 

HTTP::header insert HTTPS off

 

HTTP::header insert X-Forwarded-Proto http

 

 

}

 

 

when HTTPS_REQUEST {

 

if {[HTTPS:header]exists remove it and insert the following

 

HTTP::header insert HTTPS on

 

HTTP::header insert X-Forwarded-Proto https

 

}

 

 

is this do able and if so how ?

 

 

 

Thanks

 

 

  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    HTTP::header wiki page: Click here

    To replace existing headers, use
    HTTP::header replace ...

    To remove one header then insert another, use
    HTTP::header remove ...  
     HTTP::header insert ...

    To remove multiple instances of the same header, see the 2nd example.