Forum Discussion

pedinopa_170325's avatar
pedinopa_170325
Icon for Nimbostratus rankNimbostratus
Apr 28, 2017

HSTS not enabled

I found the iRules for implementing HSTS. They are inserting the headers but according to SSL labs the header is disabled. Why is this>

 

1: iRule for HSTS HTTP Virtuals 2: 3: when HTTP_REQUEST { 4: HTTP::respond 301 Location "https://[HTTP::host][HTTP::uri]" 5: } 6:

 

7: iRule for HSTS HTTPS Virtuals 8: 9: when RULE_INIT { 10: set static::expires [clock scan 20110926] 11: } 12: when HTTP_RESPONSE { 13: HTTP::header insert Strict-Transport-Security "max-age=[expr {$static::expires - [clock seconds]}]; includeSubDomains" 14: }