Forum Discussion
HTTP Header responce problem
- 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" }
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"
}- MattNearsOct 02, 2019
Nimbostratus
Thanks, that makes sense now, I'd not realised you could combine with else statements.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
