Package io.vertx.ext.web.handler
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 long
DEFAULT_MAX_AGE
-
Method Summary
Static Methods Modifier and Type Method Description static HSTSHandler
create()
Creates a new instance that does not consider the configuration for sub domains.static HSTSHandler
create(boolean includeSubDomains)
Creates a new instance that shall consider the configuration for sub domains.static HSTSHandler
create(long maxAge, boolean includeSubDomains)
Creates a new instance that shall consider the configuration for sub domains.
-
-
-
Field Detail
-
DEFAULT_MAX_AGE
static final long DEFAULT_MAX_AGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
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 headerincludeSubDomains
- 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.
-
-