Forum Discussion

Sdutt_328171's avatar
Sdutt_328171
Icon for Nimbostratus rankNimbostratus
Nov 01, 2017

x-forwarded-proto and x-forwarded-ssl passing to the web servers

I am new to F5. I am trying to ensure that x-forwarded-proto and x-forwarded-ssl are passing from f5 to the web servers. How should I create the irule for that?

 

  • I created this irule for forwarding the x-forwarded-for proto and ssl, will it work?

     

    when HTTP_REQUEST { if {[HTTP::header exists X-Forwarded-For]}{ HTTP::header replace X-Forwarded-For "[HTTP::header X-Forwarded-For], [IP::client_addr]" } else {

     

    HTTP::header insert X-Forwarded-For [IP::client_addr] HTTP::header insert X-Forwarded-Proto "https" HTTP::header insert X-Forwarded-Ssl "on"