Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCNAMEFlatten ¶
GetCNAMEFlatten return the flat name if it is present in the context.
func GetCanonizedHost ¶
GetCanonizedHost retrieves the canonized host from the given context (previously stored in the request context by the middleware).
func WrapHandler ¶
func WrapHandler(handler *RequestDecorator) alice.Constructor
WrapHandler Wraps a ServeHTTP with next to an alice.Constructor.
Types ¶
type RequestDecorator ¶
type RequestDecorator struct {
// contains filtered or unexported fields
}
RequestDecorator is the struct for the middleware that adds the CanonicalDomain of the request Host into a context for later use.
func New ¶
func New(hostResolverConfig *types.HostResolverConfig) *RequestDecorator
New creates a new request host middleware.
func (*RequestDecorator) ServeHTTP ¶
func (r *RequestDecorator) ServeHTTP(rw http.ResponseWriter, req *http.Request, next http.HandlerFunc)
Click to show internal directories.
Click to hide internal directories.