Documentation
¶
Overview ¶
Package middleware provides the collection of processing filters for the http request.
Index ¶
- Constants
- func AccessLogMiddleware(apiUrlPrefix string, logWriter io.WriteCloser, ...) (handler routing.Middleware, closer func(), err error)
- func CSRFFunc(isDebug bool, expire time.Duration, secure bool) (w routing.Middleware)
- func CSRFToken(ctx *fasthttp.RequestCtx) (token string)
- func CacheControlFunc(debug bool, startupTime time.Time) func(next http.Handler) http.Handler
Constants ¶
View Source
const (
// the name of CSRF cookie
CsrfCookieName = "csrf_token"
)
Variables ¶
This section is empty.
Functions ¶
func AccessLogMiddleware ¶
func AccessLogMiddleware( apiUrlPrefix string, logWriter io.WriteCloser, templateRenderer eighty.PageRenderer, logger logging.Logger) (handler routing.Middleware, closer func(), err error)
AccessLogMiddleware returns a routing.Middleware that handles error handling and access logging.
func CSRFToken ¶
func CSRFToken(ctx *fasthttp.RequestCtx) (token string)
CSRFToken returns a CSRF token in the current request context. If the token was not found in the request, zero-value returned.
Types ¶
This section is empty.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.