HTTP::header insert

I have implemented the following iRuel to add a httpheaders.

when HTTP_REQUEST {

HTTP::header insert BESPOKEHEADER “value”

}

It adds the header fine but the value is always blank

any ideas ?

BIG-IP 9.1.1 Build 54.6

Reason for adding this is we have 2 Virtual servers set up on our load balancer. One for https requests and the other for non secure request.

The servers behind the load balancers allways receive a http request as SSL is now handled by the load balancers.

Our applications can no longer use check the headers for SSL as request.servervariables[“https”] ==“off” always evaluates to true.

So i have added the http header “BESPOKEHEADER” using this iRule to the https virtual server. hope this all makes sence.

J

Hi,

The rule is simple enough and should work. I tested on a 9.2.3 unit and see in a tcpdump that the header and value are added:

P…<…GET./.HT

TP/1.1..User-Age

nt:.curl/7.10.6.

(i686-redhat-lin

ux-gnu).libcurl/

7.10.6.OpenSSL/0

.9.7i.ipv6.zlib/

1.1.4..Host:.htt

p_vip..Pragma:.n

o-cache..Accept:

.image/gif,.imag

e/x-xbitmap,.ima

ge/jpeg,.image/p

jpeg,.*/*..BESPO

KEHEADER:.value.

…

Note the BESPOKEHEADER: value at the end.

Are you sure that you’re not seeing the header and value added? Is it possible it’s being added, but the server isn’t parsing it as expected?

Aaron