Forum Discussion
ekanathdas_2662
Jun 18, 2012Nimbostratus
Yes, the virtuals have the http profile associated to them.
I believe , i am overlooking somewhere and getting the irule error. Should not the time be defined i n rule? Anywhere else should it be defined?
===error===
Jun 18 10:10:40 tmm tmm[1099]: 01220001:3: TCL error: Rule HSTS-HTTPS - can't read "static::expires": no such variab
le while executing "expr {$static::expires - [clock seconds]}"
===i rule on http virtual===
when HTTP_REQUEST {
HTTP::respond 301 Location "https://[HTTP::host][HTTP::uri]"
}
==i rule on https virtual===
when RULE_INIT {
set static::expires [clock scan 9504000]
}
when HTTP_RESPONSE {
HTTP::header insert Strict-Transport-Security "max-age=[expr {$static::expires - [clock seconds]}]"
}
Thanks.