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

Anthony's avatar
Anthony
Icon for Nimbostratus rankNimbostratus
Sep 27, 2019
Solved

TCL error on simple replace header iRule

I'm getting a TCL error from a very simple iRule and cannot understand what scenario would cause it to fail. The iRule does a simple port removal from the host header. when HTTP_REQUEST {    ...
  • Dario_Garrido's avatar
    Dario_Garrido
    Oct 04, 2019

    Try this.

    when HTTP_REQUEST {
       if { [HTTP::host] contains ":" } {
          log local0. "[HTTP::host] becomes [getfield [HTTP::host] {:} 1]"
          HTTP::header replace Host [getfield [HTTP::host] {:} 1]
       }
    }

    KR,

    Dario.