Forum Discussion

  • Y4es : how to ? :)

     

     

    it seems to work now by just defining 2 separate iRules : I capture the hostname with a global variable in the first iRule (when HTTP_REQUEST) and use it to select an SSL profile in the second (when CLIENT_ACCEPTED)....not 100% sure it works as it should. what do you think ?
  • There was a trick to it though : I had to add a RULE_INIT to reset my global variable...
  • Did you use SSL::profile?

     

     

    http://devcentral.f5.com/wiki/iRules.SSL__profile.ashx

     

     

    Aaron
  • Yes but differently. I can post my iRules if you wish. I actually have 2 iRules : the 1st one upon HTTP_REQUEST, captures the URL, sets it in a global variable and picks the pool accordingly. The 2nd, upon CLIENT-ACCEPT uses the global variable to select the SSL_PROFILE.

     

    It works :)

     

  • I think you'd want to use a local variable instead of a global. A global variable would be read and changed by any connection. So you'd have conflicts if multiple client connections occur at the same time.

     

     

    Aaron
  • Ok but will a local variable be kept across multiple iRule statements (I never managed to define it in an HTTP-REQUEST and use it in a CLIENT-ACCEPTED tight after : it refused to recognize the local variable), which I need...
  • A local variable is accessible from any iRule on the same TCP connection. If you want to store a variable across TCP connections, you can use a subtable:

     

     

    http://devcentral.f5.com/wiki/iRules.table.ashx

     

     

    Aaron