public function hsts(
        $maxAge = 31536000,
        $subdomains = false,
        $preload = false
    ) {
        Types::assert(['int|string' => [$maxAge]]);

        $this->hsts['max-age']      = $maxAge;
        $this->hsts['subdomains']   = ($subdomains == true);
        $this->hsts['preload']      = ($preload == true);
    }
public function hsts(
        $maxAge = 31536000,
        $subdomains = false,
        $preload = false
    ) {
        Types::assert(['int|string' => [$maxAge]]);

        $this->hsts['max-age']      = $maxAge;
        $this->hsts['subdomains']   = ($subdomains == true);
        $this->hsts['preload']      = ($preload == true);
    }
public function hsts ( $ maxAge = 31536000 , $ subdomains = false , $ preload = false ) { Types :: assert ( [ 'int|string' => [ $ maxAge ] ] ) ; $ this -> hsts [ 'max-age' ] = $ maxAge ; $ this -> hsts [ 'subdomains' ] = ( $ subdomains == true ) ; $ this -> hsts [ 'preload' ] = ( $ preload == true ) ; }
Used to add and configure the Strict-Transport-Security header.

HSTS makes sure that a user's browser will fill the role of redirecting
them from HTTP to HTTPS so that they need not trust an insecure response
from the network.

@api

@param int|string $maxAge
The length, in seconds either as a string, or an integer – specify the
length that a user's browser should remember that the application is
HTTPS only.

@param mixed $subdomains
Loosely casted as a boolean, whether to include the `includeSubDomains`
flag – to deploy the HSTS policy across the entire domain.

@param mixed $preload
Loosely casted as a boolean, whether to include the `preload` flag – to
consent to have the domain loaded into
[various preload lists](https://hstspreload.appspot.com/) (so that a
user need not initially visit your site securely to know about the
HSTS policy).

You must also [manually preload](https://hstspreload.appspot.com/)
your domain for this to take effect – the flag just indicates consent.

@return void
Used to add and configure the Strict - Transport - Security header .