summaryrefslogtreecommitdiff
path: root/installation
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2021-02-11 19:31:57 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2021-02-11 19:31:57 +0300
commit5992382cf86d89879b7a8e2dcbf26e910634a73a (patch)
tree56962d73ef162757190a5e1bfa37f1ba110d9907 /installation
parenta996ab46a54acbfa7a19da3eae12c78ed6466a1a (diff)
parent2cf753c5022dd7178d882e36e25b3a40dc403eff (diff)
downloadpleroma-5992382cf86d89879b7a8e2dcbf26e910634a73a.tar.gz
pleroma-5992382cf86d89879b7a8e2dcbf26e910634a73a.zip
Merge remote-tracking branch 'remotes/origin/develop' into feature/object-hashtags-rework
# Conflicts: # CHANGELOG.md # lib/mix/tasks/pleroma/database.ex # lib/pleroma/web/templates/feed/feed/_activity.rss.eex
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;