jetNEXUS Homepage
Forum Home Forum Home > jetNEXUS Products > jetNEXUS Enterprise range > Traffic Script
  New Posts New Posts RSS Feed - Hiding your servers signature
  FAQ FAQ  Forum Search   Register Register  Login Login

Hiding your servers signature

 Post Reply Post Reply
Author
Message
Support View Drop Down
Senior Member
Senior Member
Avatar

Joined: 28 Jan 2009
Location: Maidenhead
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote Support Quote  Post ReplyReply Direct Link To This Post Topic: Hiding your servers signature
    Posted: 10 Sep 2009 at 1:17pm
THe following code when pasted into a rule on jetNEXUS Enterprise Traffic Manager will remove the server's signature in the headers returned to a client. It will also remove any application headers. Once created the rule needs to added to an HTTP virtual server as a response rule:
 
# Get all response headers
$headers = http.getResponseHeaderNames();
# Work through the headers
while( $headers != "" ) {
   $p = string.find( $headers, " " );
   if( $p >= 0 ) {
      $header = string.left( $headers, $p );
      $headers = string.skip( $headers, $p + 1 );
   } else {
      $header = $headers;
      $headers = "";
   }
   # If the header matches either the server type or an application
   if ( $header == "Server" ){
      http.removeResponseHeader($header);
   }
   if ( String.startsWith($header, "X-")){
      http.removeResponseHeader($header);
   }
}
jetNEXUS Support
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 10.14
Copyright ©2001-2012 Web Wiz Ltd.

This page was generated in 0.078 seconds.