Forum Discussion

skunk69_85565's avatar
skunk69_85565
Historic F5 Account
Jun 16, 2008

http-https redirect adds Server header

Hi all,

 

I have an issue with an irule which redirects http traffic to https.

 

The irule works fine, but my customer has concerns about the Server header he sees with liveheaders:

 

 

 

HTTP/1.x 302 Found

 

Location: https://www.xxxx.xx/

 

Server: BigIP

 

Connection: Keep-Alive

 

Content-Length: 0

 

 

 

I tried the http::header insert command to modify this entry, but nothing changes here.

 

 

Now, why do we set this Server header? and is there a way to modify it within this redirect?

 

 

Thanks for your help here.

6 Replies

  • I can't find the solution which describes this, but it's expected behavior when using HTTP::respond or HTTP::redirect in older LTM versions. You can use a workaround for HTTP traffic (Click here😞

     
     TCP::respond "HTTP/1.1 302 Found\r\nLocation: https://[HTTP::host][HTTP::uri]\r\nConnection: close\r\nContent-Length: 0\r\n\r\n" 
     TCP::close 
     

    I think it's been changed in recent versions but didn't find anything about it in the 9.4.x release notes.

    Aaron
  • skunk69_85565's avatar
    skunk69_85565
    Historic F5 Account
    Thanks Aaron,

     

     

    we will try the new rule tomorrow.....

     

    Btw, we are running V9.4.4 plus HF1

     

     

    Patrick
  • spark_86682's avatar
    spark_86682
    Historic F5 Account
    For HTTP, that workaround will be OK, but not for HTTPS. Starting in 9.4.2, you can add the "noserver" keyword to HTTP::respond, and it will suppress the "Server: BIG-IP" header.

     

     

    I haven't updated the DevCentral docs with the rest of the 9.4.2+ information (detailed at http://devcentral.f5.com/Default.aspx?tabid=53&forumid=5&postid=17481&view=topic); been way too busy.
  • hi all,

     

     

    Here is sample which works for http and https:

     

     

    HTTP::respond 302 noserver Location "https://www.server.com"