Forum Discussion

Vasile_Balan_95's avatar
Vasile_Balan_95
Icon for Nimbostratus rankNimbostratus
Mar 10, 2006

HTTP Header verification and insertion

Hi,

 

 

Here is the problem. BigIP (v 4.5) has to check for a specific URI. Then, in case the URI is matched it should check for the presence of referer header. in case the referer header is not present it should add it.

 

 

something like:

 

 

if (http_uri contains "xxxx.aspx") and if (exists http_header "Referer") {use pool *****} else {insert http_header "Referer:http:/xxxx.com" and use pool ***}

 

 

Don't think the syntax is correct, just a sketch. Don't know whether on v 4.5 it is possible either.

 

 

Please help.

 

 

Thanks,

 

 

Vasile

 

 

  • checked the rules, and it seems that it is impossible to insert an http header using a rule in v 4.5.

     

     

    i guess using two pools, one with no header insertion string and one with a header insertion string and load balancing between them using a rule that would check whether the header is present or not could solve it.

     

     

    any ideas?

     

     

    Thanks,
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    It sounds like implementing your solution with two virtuals would be possible via iRules in 4.5. You could perform the first check in an iRule, and then route it accordingly to one of the two different VIPs, depending on whether you need to do the header insert or not.

     

     

    -Colin