NetScaler-13.1-How to remove the "Server" header in the response with rewrite policy

NetScaler-13.1-How to remove the "Server" header in the response with rewrite policy

book

Article ID: CTX633192

calendar_today

Updated On:

Description

How to remove the "Server" header in the response which exposes the server type information 


Instructions

Suggested to use the following commands to remove the Server header in the response

enable ns feature rewrite 

add rewrite action RemoveServerHeader delete_http_header Server

add rewrite policy RemoveServerHeader-Pol "HTTP.RES.HEADER(\"Server\").EXISTS" RemoveServerHeader 

bind vpn vserver <vserver_name> -policy RemoveServerHeader-Pol -priority 100 -gotoPriorityExpression NEXT -type RESPONSE => In this case, the virtual server is VPN virtual server

flush cache contentgroup all => clear the cache objects