Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcceptEncodingMiddleware ¶
AcceptEncodingMiddleware gzips 2xx response bodies for clients whose Accept-Encoding header allows it, streaming compressed bytes to the client as the handler writes. Compressed responses carry no Content-Length (the compressed size is unknown up front), so they are sent chunked. Partial content and bodies a handler already content-encoded pass through untouched. Statuses that must not carry a body (1xx, 204, 205, 304) are never compressed, and body writes on them are refused with http.ErrBodyNotAllowed.
func BasicAuthMiddleware ¶
func CorsMiddleware ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.