Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Add gzip support to the sample nginx configuration

Micah Elizabeth Scottb9ad99560546
diff --git a/support/nginx/peertube b/support/nginx/peertube
index 01506c7aa5..1b698576f3 100644
--- a/support/nginx/peertube
+++ b/support/nginx/peertube
@@ -37,6 +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
+ gzip on;
+ gzip_types text/plain text/css text/html application/javascript application/json;
+ gzip_vary on;
+
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
access_log /var/log/nginx/peertube.example.com.access.log;