Forum Discussion
Hi Zeropixel,
keep in mind that the sol10089 is referencing to a very specific scenario and also some rather old LTM versions.
If you want to preserve the server header on ASM enabled virtual servers on newer LTM versions, this code would make it...
when HTTP_RESPONSE {
set server_header [HTTP::header value "Server"]
}
when HTTP_RESPONSE_RELEASE {
if { $server_header ne "" } then {
HTTP::header insert Server $server_header
}
}
Note: It saves the original Server: header value into a variable during HTTP_RESPONSE. And then copies variable back to the Server: header during HTTP_RESPONSE_RELEASE. The reason for that is that ASM performs some header clean ups including the removal of Server: beader in between the two events.
To set a fixed server header value on ASM enabled virtual servers, use this code...
when HTTP_RESPONSE_RELEASE {
HTTP::header insert Server "My-Server-Name"
}
But if you don't use ASM enabled virtual servers, then this command could be used to add or overwrite the server header values...
when HTTP_RESPONSE {
HTTP::header replace Server "My-Server-Name"
}
Cheers, Kai