Interface HSTSHandler

All Superinterfaces:
Handler<RoutingContext>, SecurityPolicyHandler

public interface HSTSHandler extends SecurityPolicyHandler
HTTP Strict Transport Security (HSTS) RFC6797. This handler adds the strict transport security headers, for this domain or subdomains.
Author:
Paulo Lopes
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final long
     
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    Creates a new instance that does not consider the configuration for sub domains.
    create(boolean includeSubDomains)
    Creates a new instance that shall consider the configuration for sub domains.
    create(long maxAge, boolean includeSubDomains)
    Creates a new instance that shall consider the configuration for sub domains.

    Methods inherited from interface Handler

    handle
  • Field Details

  • Method Details

    • create

      static HSTSHandler create(long maxAge, boolean includeSubDomains)
      Creates a new instance that shall consider the configuration for sub domains.
      Parameters:
      maxAge - max age to attribute to the header
      includeSubDomains - consider sub domains when adding the header
      Returns:
      an instance.
    • create

      static HSTSHandler create(boolean includeSubDomains)
      Creates a new instance that shall consider the configuration for sub domains.
      Parameters:
      includeSubDomains - consider sub domains when adding the header
      Returns:
      an instance.
    • create

      static HSTSHandler create()
      Creates a new instance that does not consider the configuration for sub domains. Using the default max age.
      Returns:
      an instance.