package
0.0.0-20221219135034-356dc927fc4a
Repository: https://github.com/phogolabs/restify.git
Documentation: pkg.go.dev
# Functions
GetLogger returns the associated request logger.
Logger is a middleware that logs the start and end of each request, along with some useful data about what was requested, what the response status was, and how long it took to return.
Recoverer is a middleware that recovers from panics, logs the panic (and a backtrace), and returns a HTTP 500 (Internal Server Error) status if possible.
StripSlashes is a middleware that will match request paths with a trailing slash, strip it from the path and continue routing through the mux, if a route matches, then it will serve the handler.
Tracer is a middleware that uses openconsensus to trace a http requests.
# Variables
NoCache is a simple piece of middleware that sets a number of HTTP headers to prevent a router (or subrouter) from being cached by an upstream proxy and/or client.
RealIP is a middleware that sets a http.Request's RemoteAddr to the results of parsing either the X-Forwarded-For header or the X-Real-IP header (in that order).
RequestID is a middleware that injects a request ID into the context of each request.