diff options
| author | feld <feld@feld.me> | 2021-02-05 19:46:53 +0000 | 
|---|---|---|
| committer | feld <feld@feld.me> | 2021-02-05 19:46:53 +0000 | 
| commit | 4dd28b4bd1c49d61018ae607a6775649e4d323bf (patch) | |
| tree | 863a2016d1f5baca7f4b5dd60b30bfb0e1423571 /installation | |
| parent | d7262f7d2232343e47c2206b134a7d794e35c505 (diff) | |
| parent | 1d8f1fe0772736dd71219d244783c9d671dd7223 (diff) | |
| download | pleroma-4dd28b4bd1c49d61018ae607a6775649e4d323bf.tar.gz pleroma-4dd28b4bd1c49d61018ae607a6775649e4d323bf.zip  | |
Merge branch 'varnish-large-files' into 'develop'
Improve Varnish VCL
See merge request pleroma/pleroma!3305
Diffstat (limited to 'installation')
| -rw-r--r-- | installation/pleroma.vcl | 7 | 
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;  | 
