Forum Discussion

playfair039_320's avatar
playfair039_320
Icon for Nimbostratus rankNimbostratus
Nov 11, 2017

submit client request before http redirect

Is there a way to send the client request to the downstream server before redirecting the client? so desired flow is 1, when http request 2, if uri eq /logout (for example) 3, pass request to a downstream server (jsessionid persistence is in use) 4, redirect the user to the homepage. Thanks in advance

 

1 Reply

  • You can detect logout uri in HTTP_REQUEST and redirect in HTTP_RESPONSE

    when HTTP_REQUEST {    
        if {[HTTP::path] equals "/logout"} {        
            set logout 1            
        } else {        
            set logout 0            
        }            
    }       
    
    when HTTP_RESPONSE {        
        if {$logout} {        
            HTTP::redirect /foo            
        }
    }