Documentation
¶
Overview ¶
Package stdhttpware provides cross-cutting middleware http handlers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
Apply applies the middleware in the correct order. The values of sensitiveHeaders, which carry credentials, are redacted wherever headers are logged; their case does not matter.
func NewConnectCORSMiddleware ¶
func NewConnectCORSMiddleware(maxAgeSeconds int, whiteList ...string) func(http.Handler) http.Handler
NewConnectCORSMiddleware initializes the CORS middleware. In our case CORS is allowed if the origin of the request is on the same root domain as the requests host, i.e: it is a first party request.
func RootDomainOfHost ¶
RootDomainOfHost returns the "root" part of the host provided.
Types ¶
This section is empty.