This commit is contained in:
6543 2022-07-15 21:14:32 +02:00
parent b49bd86cdf
commit edb592fbbb
No known key found for this signature in database
GPG key ID: C99B82E40B027BAE

View file

@ -196,7 +196,7 @@ func (o *Options) Upstream(ctx *fasthttp.RequestCtx, giteaClient *gitea.Client,
}
log.Debug().Msg("response")
if res != nil && ctx.Err() == nil {
if res != nil && res.Header.ContentLength() > fileCacheSizeLimit && ctx.Err() == nil {
cachedResponse.Exists = true
cachedResponse.MimeType = mimeType
cachedResponse.Body = cacheBodyWriter.Bytes()