Forum Discussion

Christophe_Lem2's avatar
Sep 28, 2015
Solved

How to change Server header sent by HTTP::redirect ?

Hi,

I'm using a very simple iRule to redirect http traffic to https URL. But the response contains a Server header with BigIP as value. How can I change this?

Here is the iRule I'm using:

when HTTP_REQUEST {
  HTTP::redirect "https://some.web.site?target=[URI::encode http://[HTTP::host][HTTP::uri]]"
}

Here is the response I get:

HTTP/1.0 302 Found
Location: https://some.web.site?target=http%3a%2f%2fblah%2f
Server: BigIP
Connection: close
Content-Length: 0

I'd like to replace BigIP by some.web.site. I've tried the following but it is not working...

when HTTP_RESPONSE {
  HTTP::header replace Server "some.web.site"
}

Is it possible? Any suggestion?

Thanks, Christophe

  • You can change the server header in the HTTP profile. It is configurable in version 11.5+ I believe.

     

7 Replies

  • Try using HTTP::respond instead and manually specifying the server header (or you can use

    noserver
    to remove it completely)

    HTTP::respond 302 Location ""https://some.web.site?target=[URI::encode http://[HTTP::host][HTTP::uri]]" "Server" "some.web.site"
    
  • You can change the server header in the HTTP profile. It is configurable in version 11.5+ I believe.

     

  • You can change the server header in the HTTP profile. It is configurable in version 11.5+ I believe.