For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Thiyagu's avatar
Thiyagu
Icon for Cirrus rankCirrus
Nov 05, 2020

Need help for an irule for insertion of X-Forwarded-Proto

Hello All,

I'm working on a request to insert the protocol from the client. Does the below iRule would work to insert the protocol from the client?

when HTTP_REQUEST {

HTTP::header insert X-Forwarded-Proto:https

}

 

how does inserting of protocol in the header will help to identify the protocol between client and load balancer if we are using the redirection from http to https?

 

Thanks a lot in Advance.

 

Regards,

Thiyagu

1 Reply

  • When there's http2https redirect already for http setup, I wouldn't go nor I see a need with inserting X-Forwarded-Proto into that either through http profile or through Irule.

     

    The intention of X-Forwarded-Proto is to let the end server know what the client machine protocol its coming in with. Its similar to the XFF - To know the original source ip.

     

    X-Forwarded-Proto often helps to avoid continuous loops, especially when the connections are proxied & the applications resources are having absolute path, thus including the protocol causing it go on continuous loop.

     

    You can insert X-Forwarded-Proto using the http profile insert or through Irule for the https setup.