Virtualrana_132
Nov 07, 2014Nimbostratus
HSTS - Header not inserted with iRule
Hi,
Following is my iRule which is attached to $mydomain$ (http) VirtualServer in F5 for HSTS, but it is not inserting the "Strict-Transport-Security" header in the http response. When I run "curl -s -D- $mydomain$.com.au | grep Strict", it doesn't return anything. Am I missing something here? Please advise...
===================================================================
when HTTP_REQUEST { HTTP::respond 301 Location "https://[HTTP::host][HTTP::uri]" }
when HTTP_RESPONSE { HTTP::header insert Strict-Transport-Security "max-age=31536000" }
=====================================================================
Thanks and regards.
Rana