Forum Discussion

jwhitene's avatar
jwhitene
Icon for Nimbostratus rankNimbostratus
Feb 15, 2016

Send custom header to server, not client.

Would this iRule,

 

when HTTP_REQUEST { HTTP::header insert "MyHeaderName" "MyHeaderValue" }

 

when applied to a virtual server, send the "MyHeaderName/MyHeaderValue" header to the back-end web servers?

 

If not, how can I trigger a header to be created and sent to the back-end web servers with each client request?

 

3 Replies

    • jwhitene's avatar
      jwhitene
      Icon for Nimbostratus rankNimbostratus
      So was HTTP_REQUEST { HTTP::header insert "MyHeaderName" "MyHeaderValue" } actually sending "MyHeaderName/MyHeaderValue" to the client with each request? The opposite of what I wanted to do?
  • Hi Josh,

     

    Your syntax looks fine and does exactly what you've asked for. The HTTP_REQUEST (my prefered event), HTTP_REQUEST_SEND or HTTP_REQUEST_RELEASE events are almost interchargeable in your specific case...

     

    Cheers, Kai