Forum Discussion
ekanathdas_2662
May 14, 2012Nimbostratus
HSTS (HTTP Strict Transport Security)
Hi team, Was trying the HSTS irule posted in "https://devcentral.f5.com/weblogs/d...start.aspx". The vip on port 80 already had a ssl redirect irule (http to https). When the below irule...
Yasir_Al-Musawi
Nimbostratus
Your issue is with the clock scan value
it should be [clock scan yyyymmdd]
or you can use this instead of what you are using
==i rule on https virtual===
when HTTP_RESPONSE { HTTP::header insert Strict-Transport-Security "max-age=31536000 ; includeSubDomains" }
JG
May 11, 2018Cumulonimbus
when RULE_INIT {
set static::expires [clock scan "12 month"]
}
when HTTP_RESPONSE {
HTTP::header insert Strict-Transport-Security "max-age=[expr {$static::expires - [clock seconds]}]; includeSubDomains"
}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects