enable compression

This commit is contained in:
alexelisenko
2023-04-10 19:20:54 -04:00
committed by Cuong Manh Le
parent 24e62e18fa
commit 0043fdf859
2 changed files with 7 additions and 1 deletions

4
.gitignore vendored
View File

@@ -1,3 +1,5 @@
dist/
gon.hcl
/Build
.DS_Store

View File

@@ -236,6 +236,10 @@ func (p *prog) proxy(ctx context.Context, upstreams []string, failoverRcodes []i
ctrld.Log(ctx, mainLog.Debug(), "failover rcode matched, process to next upstream")
continue
}
// set compression, as it is not set by default when unpacking
answer.Compress = true
if p.cache != nil {
ttl := ttlFromMsg(answer)
now := time.Now()