Forum Discussion
HSTS - Header not inserted with iRule
Hi Guys... Thank you for your responses.
@ Eastman: I've added the bit you mentioned and following is how the iRule looks like. Still no luck and the log shows nothing.
====
iRule for HSTS HTTP Virtuals
when HTTP_REQUEST { HTTP::respond 301 Location "https://[HTTP::host][HTTP::uri]" }
when HTTP_RESPONSE { HTTP::header insert Strict-Transport-Security "max-age=31536000"
foreach headerName [HTTP::header names] { append headerNames " |$headerName: [HTTP::header value $headerName]" }
log local0. "$headerNames"
}
====
@ bepsoccer: My understanding: I applied the iRule to http VS as the first line of the iRule is HTTP REDIRECT, so i didn't apply the iRule to HTTPS VS. Please correct me if I am wrong.
Thanks guys, appreciate your help.
Rana
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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