Documentation ¶
Overview ¶
Package https provides utilities for configuring and running HTTP servers over TLS.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RedirectHandler ¶
RedirectHandler takes an http.Handler and returns a secured form of it.
Types ¶
type Config ¶
type Config struct { InsecurePort int `env:"HEROKU_ROUTER_HTTP_PORT,required"` SecurePort int `env:"HEROKU_ROUTER_HTTPS_PORT,required"` // These environement variables are automatically set by ACM in // relation to Let's Encrypt certificates. ServerCert string `env:"SERVER_CERT,required"` ServerKey string `env:"SERVER_KEY,required"` UseAutocert bool `env:"HTTPS_USE_AUTOCERT"` }
Config for HTTP and HTTPS servers.
Click to show internal directories.
Click to hide internal directories.