Forum Discussion
pedinopa_170325
Nimbostratus
Jan 22, 2018HSTS via irule
I have 2 irules. 1 for HTTP HSTS and the other for HTTPS HSTS. they insert the headers but hsts is not enabled. I am running 11.5.4 so the HSTS config is not in my HTTP profile, how can I enable it...
JG
Cumulonimbus
Jan 23, 2018The problem with your irule is that "20110926" is a past date. It needs to be a period of time starting from the runtime. Try this one:
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]}]; includeSubDomain"
}
.
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