ltm rule command HTTP hstsΒΆ

iRule(1)						BIG-IP TMSH Manual						  iRule(1)

HTTP::hsts
       Controls HTTP Strict Transport Security.

SYNOPSIS
       HTTP::hsts

       HTTP::hsts (
			   ( 'value' ) |
			   ( mode		(enable | disable)? ) |
			   ( maximum-age	(MAXIMUM_AGE_SECONDS)? ) |
			   ( include-subdomains (enable | disable)? ) |
			   ( preload		(enable | disable)? )
			  )

DESCRIPTION
       This controls the HTTP Strict Transport Security feature options on a per-flow basis, overriding the configured values in
       the HTTP profile.

RETURN VALUE
       If a value isn't given, the HTTP::hsts command will return the corresponding sub-commands currently configured value for
       this connection.

VALID DURING
       Any event

EXAMPLES
	when HTTP_REQUEST {
	    if { [HTTP::uri] contains "secure"} {
		HTTP::hsts mode enable
		HTTP::hsts maximum-age 8600
		HTTP::hsts include-subdomains disable
		HTTP::hsts preload enable
	    }
	}

	when HTTP_RESPONSE_RELEASE {
	    log local0.debug "HTTP Strict-Transport-Security header: [HTTP::hsts]"
	}

HINTS
SEE ALSO
CHANGE LOG
       @BIGIP-12.0.0 --First introduced the command.

BIG-IP							    2022-04-12							  iRule(1)