summaryrefslogtreecommitdiff
path: root/installation/pleroma.vcl
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2021-04-30 13:17:03 -0500
committerAlex Gleason <alex@alexgleason.me>2021-04-30 13:17:03 -0500
commit52fc59f125c10ad73b9fd1a0639b6dc5681776ca (patch)
tree7de32329acbdd4bdf5c753678a2d459c61b58d80 /installation/pleroma.vcl
parenta8fa00ef666f574aec8048626aed78a7d62e6915 (diff)
parent377f84f3678f9c2541fbd4a200cd93c5ab0dea24 (diff)
downloadpleroma-52fc59f125c10ad73b9fd1a0639b6dc5681776ca.tar.gz
pleroma-52fc59f125c10ad73b9fd1a0639b6dc5681776ca.zip
Merge remote-tracking branch 'upstream/develop' into earmark
Diffstat (limited to 'installation/pleroma.vcl')
-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;