Documentation
¶
Index ¶
- func HandleBrotli(next http.Handler) http.Handler
- func HandleHTMLMinification() func(http.Handler) http.Handler
- func HandleHTTPMethodConversion(next http.Handler) http.Handler
- func InjectUserContext(next http.Handler, uid string, username string) http.Handler
- func InjectWorkerPoolIntoContext(next http.Handler, workerPool pond.Pool) http.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleHTMLMinification ¶
HandleHTMLMinification returns a chi middleware that minifies HTML responses
func HandleHTTPMethodConversion ¶
handleHTTPMethodConversion is a middleware component that checks for the combination of a POST method with a form field named _method having a value of PUT. POST method with a form field named _method having a value of DELETE. It converts the request method to PUT or DELETE accordingly. This middleware should be used before any handlers that require PUT or DELETE methods to function correctly. It is typically used in web applications that need to support RESTful operations via HTML forms. It is designed to be used with the Chi router, but can be adapted for other routers It should run early in the middleware stack.
func InjectUserContext ¶ added in v1.20.0
Types ¶
This section is empty.