F5 is upgrading its customer support chat feature on My.F5.com. Chat support will be unavailable from 6am-10am PST on 1/20/26. Refer to K000159584 for details.

Forum Discussion

Marc_13733's avatar
Marc_13733
Icon for Nimbostratus rankNimbostratus
Nov 04, 2013

Country code as X- Header

We've noticed that the F5 seems to know the country of visitors (presumably based on some IP lookup). Is there any way to get the F5 to pass the country code (e.g. "US" for U.S.A. or "DE" for Germany) to the web application as, e.g., an X-Country request header?

 

3 Replies

  • Thanks, so all I would need to know is how to set an X-header based on this

    whereis  country
    variable.

  • The HTTP::header insert method will do that for you, and the name of the header is arbitrary. Example:

    when HTTP_REQUEST {
        HTTP::header insert "X-Country" [whereis [IP::client_addr] country]
    }