rpc: enable compression on HTTP transport (#19997)
This change adds support for gzip encoding on HTTP responses. Gzip encoding is used when the client sets the 'accept-encoding: gzip' header. Original change by @brianosaurus, with fixes from @SjonHortensius.
This commit is contained in:
committed by
Felix Lange
parent
54b271a86d
commit
961aa0533f
@ -216,6 +216,7 @@ func NewHTTPServer(cors []string, vhosts []string, timeouts HTTPTimeouts, srv ht
|
||||
// Wrap the CORS-handler within a host-handler
|
||||
handler := newCorsHandler(srv, cors)
|
||||
handler = newVHostHandler(vhosts, handler)
|
||||
handler = newGzipHandler(handler)
|
||||
|
||||
// Make sure timeout values are meaningful
|
||||
if timeouts.ReadTimeout < time.Second {
|
||||
|
Reference in New Issue
Block a user