Inject TLS version into HTTP header
I'm planning to disable support for TLS 1.0, but want to give my users some time to update to modern browsers before I pull the plug on older browsers that don't support TLS 1.1 and 1.2. I'd like to display a message ("It's time to upgrade your browser") in my web app for customers who negotiate a TLS 1.0 connection. Is it possible to inject an HTTP header (say "tls-version") into the browser's request?Solved2.3KViews0likes7CommentsiRule to replace content of the location header on HTTP Responses
I'm trying to create an iRule that will detect if a web server is sending it's private IP address in the location header on it's responses. The logic is to read the location header in the responses, detect if the private IP addresses of the servers are included on them and replace the content of the location header to the website's URL, leaving everything else intact. This is the initial code I came up with. Should this work? Any better suggestions? when HTTP_RESPONSE { if { ( [HTTP::header Location] contains "10.0.0.11" ) || ( [HTTP::header Location] contains "10.0.0.12" ) } { [HTTP::header Location] replace "www.mywebsite.com" } }1.9KViews0likes3CommentsIssues with X-XSS Protection HTTP Header
Hey folks, we recently implemented some HTTP headers onto our F5 irules and recently noticed that one of them (X-XSS-Protection) isn't showing up. At the moment, we have them in place in our irule as such: when HTTP_REQUEST { if { !([HTTP::header exists "X-Frame-Options"])} { HTTP::header insert "X-Frame-Options" "SAMEORIGIN" } if { !([HTTP::header exists "X-XSS-Protection"])} { HTTP::header insert "X-XSS-Protection" "1; mode=block" } if { !([HTTP::header exists "X-Content-Type-Options"])} { HTTP::header insert "X-Content-Type-Options" "'nosniff'" } } When we run a curl URL -I against the site, it returns the X-Content-Type-Options and X-Frame-Options headers, but not the X-XSS-Protection header. Is there something we're doing wrong? Thanks!Solved1.3KViews0likes2CommentsBIG-IP add custom header
F5 BIG-IP LTM VE v11.4.0 on ESXi I want to add a custom header to my request before rewriting to a backend server : when HTTP_REQUEST { HTTP::header insert uri-original [HTTP::uri] ... HTTP::uri $rewrite_uri pool backend-pool-01 } However my tests do not show this header present. Am I adding the header correctly ? What are the rules around retaining added headers ? How can I log all headers present in my request ? UPDATE ( 2014-11-29 ) : For case where iRule is assigned to a virtual-server with an http profile, I verified above TCL does add header as expected. However, for https case, adding the header writes errors to the f5 logs : Nov 14 22:03:03 f5-01 err bigd[6134]: 01060111:3: Open SSL error - error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure. Nov 14 22:03:04 f5-01 err tmm1[8371]: 01220001:3: TCL error: /Common/xheader-irule-01 - Operation not supported (line 1) invoked from within "HTTP::header insert original-uri [HTTP::uri]"1.1KViews0likes16CommentsAN IRULE THAT PERFORMS HEADER ENRICHMENT AND SENDS TRAFFIC TO A Specific IP (MMSC)
I have a requirement to forward mms traffic to a specific mmsc, and perform header enrichment. I have an irule to forward traffic to a specific ip address. What irule can be used to combine that with header enrichment. This is my current irule. when HTTP_REQUEST { if { [HTTP::host] equals "10.199.212.15" && [HTTP::uri] equals "/servlets/mms"} { pool mmsc_pool } }572Views0likes5CommentsHow can I reorder HTTP headers?
I want to insert an HTTP header into the current list of HTTP headers, but I need it to be the first HTTP header in the list, before the Host, Content-Type and Content-Length. Using the standard HTTP::header insert, puts it at the. Since there are no commands to insert it into a specific spot, I figure I need to create a variable with each HTTP::header name=value pair and then delete them all, then start adding one by one starting with my custom one. Either way, I have been trying foreach loops and while loops and can't figure out how to use a dynamic variable that increments as I iterate through the number of inbound HTTP headers. I'm currently trying something like this: set y 0 set hc [HTTP::header count] while {$y <= $hc} { log local0. "y=$y" set v "v-$y" log local0. "v=$v" set na "[HTTP::header at $y]" set va "[HTTP::header value $na]" log local0. "na=$na va=$va" set $v "$na $va" log local0. "v=$v" incr y } I'm sure I'm missing some tcl savvy so I'll take any suggestions you have.448Views0likes3CommentsHTTPS getting the uri
I'm trying to do a redirect with iRules that if user goes to https://xxx.xxx/bob it goes to another site. However it doesn't works. It only works if the users goes to http://xxx.xxx/bob. Do you have to do something special for https sites? when HTTP_REQUEST { if { [HTTP::uri] ends_with "bob" } "HTTP::redirect "http://www.google.com" }}Solved434Views0likes4CommentsBIG-IP : iRule fails to find cookie
In Google Advanced REST Client , I send my GET request with headers : Cookie: special=1 My iRule has the following code : when HTTP_REQUEST { set cookie_special [HTTP::cookie value "special"] log local0. "cookie_special = $cookie_special" This logs as : cookie_special = So apparently F5 is not finding a cookie named "special". How can I further diagnose this issue ?427Views0likes6CommentsHow to use literals starting with "$" in iRule
Hi, I need to pass client certificate to WebSphere so the application can perform SSL based authentication. I following this article https://support.f5.com/csp/article/K95338243 However in WebSphere App Server the headed for client certificate is $WSCC. But if I code iRule like this when HTTP_REQUEST { HTTP::header insert $WSCC [b64encode [SSL::cert 0]] } $WSCC is treated as a variable WCSS and the rule is broken How do I get around this issue? Thanks Genna378Views0likes2CommentsAccessing Custom Request Header fields inserted from Back end Application
Is there a way to access Custom HTTP Request Header fields that are inserted from a backend application using iRules? I am accessing a web page from the webserver that is displaying all the Request Header fields - including some custom header fields created by this application. So the header fields are present at the time this page renders. I have been trying to use iRules to access these custom header fields, but when I dump the header, I only see the basic request header fields, none of the custom fields. I am assuming this is the case because I am querying the header from the HTTP_REQUEST event, and that this event is firing before that backend application page has inserted the custom fields into the header. So, my question is, is there an event where I can query the header and pull these fields that the application inserted?362Views0likes4Comments