Forum Discussion
Jim_Mathers_131
Jul 09, 2018Nimbostratus
Simplest way to insert "Strict-Transport-Security: max-age=63072000" for all HTTP responses
Hey folks, what is the easiest way to insert that header on an HTTPS vip where we are offloading SSL?
Thanks, Jim
crodriguez
Jul 09, 2018Ret. Employee
How about something like below? This solution checks to make sure the server is not already sending one before inserting the default.
when HTTP_RESPONSE {
If server has not sent an HSTS header, BIG-IP will
if { !([HTTP::header exists "Strict-Transport-Security"]) } {
HTTP::header insert "Strict-Transport-Security" "max-age=63072000"
}
}
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