For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Nobu's avatar
Nobu
Icon for Nimbostratus rankNimbostratus
Jul 04, 2018

Added HTTP header information at redirect

I want to add HTTP header information when redirecting.

 

When adding HTTP header information (cipher version), there was no problem below.

 

when HTTP_REQUEST {

 

HTTP::header insert header_ssl [SSL::cipher version]

 

}

 

Even if you describe the redirect after this, header information was not added to the redirect request.

 

when HTTP_REQUEST {

 

HTTP::header insert header_ssl [SSL::cipher version]

 

HTTP::respond 302 Location ";

 

}

 

In order to add HTTP header information using [HTTP::respond], I thought of the following iRule. when HTTP_REQUEST {

 

HTTP::respond 302 Location "; header_ssl [SSL::cipher version]

 

}

 

The result was that HTTP header information was not added.

 

Please give me a solution.

 

2 Replies

  • What are you trying to achieve by adding the TLS version as a header?

     

    I am unaware of any way to ask that a client insert a specific value into the header of their request to another page/domain etc. Do you have control over test.co.jp ?

     

    You could potentially look into using cookies

     

  • Hi Nobu,

    Below the syntax that you have to use:

    HTTP::respond 302 Location "http://test.co.jp/index.html" header_ssl [SSL::cipher version]

    Therefore you will see the header only in the response and not in the request when you will be redirect to ";. it's normal behavior.

    I advise you to follow the below procedure in order to reach you need:

    Use your irule to redirect user but if you want to retrieve headerSSL info you have to insert it on the uri as parameter:

    HTTP::respond 302 Location "http://test.co.jp/index.html?header_ssl=[SSL::cipher version]"

    On the other VS use this irule to retieve information needed:

    when HTTP_REQUEST {
    
    set uri [HTTP::uri]
    
    if {$uri starts_with "/index.html" && $uri contains "header_ssl"} {
        set header_ssl [URI::query [HTTP::uri] header_ssl]
        HTTP::uri /index.html
        return
    }
    
    }
    

    So keep me in touch it it respond to your need and if you need more details.

    Regards