This commit is contained in:
6543 2022-07-15 21:39:42 +02:00
parent bcaceda711
commit 8207586a48
No known key found for this signature in database
GPG key ID: C99B82E40B027BAE

View file

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