summaryrefslogtreecommitdiff
path: root/installation
diff options
context:
space:
mode:
authorfeld <feld@feld.me>2021-02-08 22:01:32 +0000
committerMark Felder <feld@feld.me>2021-02-08 16:01:50 -0600
commit593c0851d9a62977f5a6abd22df991b0d73da657 (patch)
treec469efff6113ca9f860b0c7222ad8c842ca4e120 /installation
parent0368419fce04f636d2c5adcf44e7d35c43279dc1 (diff)
parenta5bee1bf35a3a771aa259cc98190f24e84880f47 (diff)
downloadpleroma-593c0851d9a62977f5a6abd22df991b0d73da657.tar.gz
pleroma-593c0851d9a62977f5a6abd22df991b0d73da657.zip
Merge branch 'develop' into 'new-user-emails'
Diffstat (limited to 'installation')
-rw-r--r--installation/pleroma.vcl7
1 files changed, 7 insertions, 0 deletions
diff --git a/installation/pleroma.vcl b/installation/pleroma.vcl
index 13dad784c..4752510ea 100644
--- a/installation/pleroma.vcl
+++ b/installation/pleroma.vcl
@@ -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;