hsts

package
v0.0.0-...-891d2fd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2022 License: BSD-3-Clause, BSD-3-Clause Imports: 3 Imported by: 0

README

hsts

GoDoc

This package defines a hsts enabling request handler for strict transport security.

Dependencies

These are the only two external dependencies required as they are necessary to take into account the execution context of a request-handling goroutine.

License

BSD 3-clause

Documentation

Overview

Package hsts is used to enforce a Strict Transport Security.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler is an object that enforces the use of Strict Transport Security.

func New

func New(maxage int, withsubdomains bool) Handler

New is a handler that enforces the use of Strict Transport Security.

Link registers a next request Handler to be called by ServeHTTP method. It returns the result of the linking.

func (Handler) ServeHTTP

func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL