chore: improve terraform install performance (#7478)

This commit is contained in:
Ammar Bandukwala
2023-05-11 14:30:51 -05:00
committed by GitHub
parent 0e6361383c
commit 640fcf450c
4 changed files with 9 additions and 6 deletions

View File

@ -5,6 +5,7 @@ import (
"crypto/tls"
"crypto/x509"
"encoding/json"
"flag"
"fmt"
"io"
"net/http"
@ -878,7 +879,12 @@ func (api *API) Close() error {
}
func compressHandler(h http.Handler) http.Handler {
cmp := middleware.NewCompressor(5,
level := 5
if flag.Lookup("test.v") != nil {
level = 1
}
cmp := middleware.NewCompressor(level,
"text/*",
"application/*",
"image/*",