Sean_McGirk_859
Aug 07, 2015Nimbostratus
Insert x-forwarded-proto and x-forwarded-port - Is this the correct way to do it?
One of my application owners approached me with the need to insert both x-forwarded-proto and x-forwarded-port. I have this iRule ready but am looking for some feedback on the syntax. Will this insert both? Thanks!
when HTTP_REQUEST { if {([TCP::local_port] ==443) and !( [HTTP::header "X-Forwarded-Proto"] eq "https") }{
HTTP::header insert X-Forwarded-Proto "https" }elseif {([TCP::local_port] ==443) and !( [HTTP::header "X-Forwarded-Port"] eq "443") }{
HTTP::header insert X-Forwarded-Port "443" }
}