mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-17 18:49:15 +00:00
Merge branch 'varnish-large-files' into 'develop'
Improve Varnish VCL See merge request pleroma/pleroma!3305
This commit is contained in:
commit
4dd28b4bd1
|
@ -59,6 +59,13 @@ sub vcl_backend_response {
|
|||
set beresp.http.CR = beresp.http.content-range;
|
||||
}
|
||||
|
||||
# Bypass cache for large files
|
||||
# 50000000 ~ 50MB
|
||||
if (std.integer(beresp.http.content-length, 0) > 50000000) {
|
||||
set beresp.uncacheable = true;
|
||||
return(deliver);
|
||||
}
|
||||
|
||||
# Don't cache objects that require authentication
|
||||
if (beresp.http.Authorization && !beresp.http.Cache-Control ~ "public") {
|
||||
set beresp.uncacheable = true;
|
||||
|
|
Loading…
Reference in a new issue