From a18e02f358581fe86d97a8768064e83eb6488074 Mon Sep 17 00:00:00 2001 From: Micah Elizabeth Scott Date: Thu, 23 Aug 2018 12:12:08 -0700 Subject: Only enable gzip for HTML/CSS/JS No compression on JSON endpoints, in order to protect from potential compression+encryption data leak attacks (like BREACH) --- support/nginx/peertube | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'support/nginx') diff --git a/support/nginx/peertube b/support/nginx/peertube index 1b698576f..0720dbd97 100644 --- a/support/nginx/peertube +++ b/support/nginx/peertube @@ -37,9 +37,11 @@ server { # resolver $DNS-IP-1 $DNS-IP-2 valid=300s; # resolver_timeout 5s; - # Enable compression for JS/CSS/HTML and JSON, for improved client load times + # Enable compression for JS/CSS/HTML bundle, for improved client load times. + # It might be nice to compress JSON, but leaving that out to protect against potential + # compression+encryption information leak attacks like BREACH. gzip on; - gzip_types text/plain text/css text/html application/javascript application/json; + gzip_types text/css text/html application/javascript; gzip_vary on; add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"; -- cgit v1.2.3