Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Dev bool
Dev, when set, disables HTTP caching of static assets: they are served with "no-cache" (still revalidated via ETag) so edits to the web client show up on a normal reload. Off in production.
var ErrIsDirectory = errors.New("is a directory")
var Insecure bool
var LetsEncrypt string
LetsEncrypt, when non-empty, is a comma-separated list of hostnames for which TLS certificates are obtained automatically from Let's Encrypt. Mutually exclusive with Insecure.
var StaticRoot string
Functions ¶
func CheckOrigin ¶
CheckOrigin adds the CORS header to the reply. It obeys the AllowOrigin or AllowAdminOrigin field of the global configuration, depending on the value of admin. It returns true if the header was added, false otherwise.
func SetTrustedProxies ¶ added in v0.3.1
SetTrustedProxies parses a comma-separated list of IP addresses and CIDR prefixes of trusted reverse proxies.
Types ¶
This section is empty.