Forum Discussion

MattNears's avatar
MattNears
Icon for Nimbostratus rankNimbostratus
Oct 02, 2019

HTTP Header responce problem

Good Morning, I have an issue with some of my response headers and an irule for replacing certain responses. The rule I have below is set agains a number of our sites but when running a header respo...
  • Enes_Afsin_Al's avatar
    Oct 02, 2019

    Hi MattNears,

    If server's response contains "Server" header or "X-Powered-By" header or other headers in the iRule, "Server" and "X-Powered-By" headers will come back with the actual server and IIS details. You should use "else" blocks and HTTP::header replace command.

    if { !([HTTP::header exists "Server"]) } {
    	HTTP::header insert "Server" "A-Server"
    } else {
    	HTTP::header replace "Server" "A-Server"
    }