diff options
| author | Guilhem Moulin <guilhem@fripost.org> | 2020-05-17 17:25:34 +0200 | 
|---|---|---|
| committer | Guilhem Moulin <guilhem@fripost.org> | 2020-05-17 18:30:03 +0200 | 
| commit | 407acdd1a00d1dc2242362f2b569bd261fb1d2e5 (patch) | |
| tree | 0bc88d62e1bd0f096f661dd3290f3af5d86089f5 /roles | |
| parent | caf1eb7d7b3082a6b3a335e59cdd5813b82f3966 (diff) | |
lists.fripost.org: Improve gzip support.
Diffstat (limited to 'roles')
| -rw-r--r-- | roles/lists/files/etc/nginx/sites-available/sympa | 7 | 
1 files changed, 3 insertions, 4 deletions
diff --git a/roles/lists/files/etc/nginx/sites-available/sympa b/roles/lists/files/etc/nginx/sites-available/sympa index cdc2364..4cfc11b 100644 --- a/roles/lists/files/etc/nginx/sites-available/sympa +++ b/roles/lists/files/etc/nginx/sites-available/sympa @@ -19,68 +19,67 @@ server {      listen      443 ssl http2;      listen [::]:443 ssl http2;      server_name  lists.fripost.org;      access_log /var/log/nginx/lists.access.log;      error_log  /var/log/nginx/lists.error.log info;      include snippets/headers.conf;      add_header Content-Security-Policy                 "default-src 'none'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self'; font-src 'self'; frame-ancestors 'none'; form-action 'self'; base-uri lists.fripost.org";      include snippets/ssl.conf;      ssl_certificate     ssl/lists.fripost.org.pem;      ssl_certificate_key ssl/lists.fripost.org.key;      include             snippets/lists.fripost.org.hpkp-hdr;      gzip on;      gzip_vary on;      gzip_min_length 256; -    gzip_proxied expired no-cache no-store private no_last_modified no_etag auth; -    gzip_types application/javascript application/json application/xml image/x-icon text/css text/plain; +    gzip_types application/font-woff application/font-woff2 application/javascript application/json application/xml image/x-icon text/css text/plain;      location = /robots.txt {          allow all;          log_not_found off;          access_log off;          alias /etc/sympa/robots.txt;      }      location = / {          return 302 /sympa$args;      }      location ^~ /static-sympa/   { alias /usr/share/sympa/static_content/; }      location ^~ /css-sympa/      { alias /var/lib/sympa/css/; }      location ^~ /pictures-sympa/ { alias /var/lib/sympa/pictures; }      location ~* ^/sympa(?:/|$) { -        gzip off; +        gzip off; # protect against BREACH          fastcgi_split_path_info ^(/sympa)(.*)$;          include snippets/fastcgi.conf;          fastcgi_param PATH_INFO $fastcgi_path_info;          fastcgi_pass unix:/run/wwsympa.socket;      }      location ~* ^/([^/]+)/?$ {          return 302 /$1/sympa$args;      }      location ~* ^/(?<vhost>[^/]+)/sympa(?:/|$) { -        gzip off; +        gzip off; # protect against BREACH          if (!-f /etc/sympa/$vhost/robot.conf) {              return 404;          }          fastcgi_split_path_info ^(/[^/]+/sympa)(.*)$;          include snippets/fastcgi.conf;          fastcgi_param PATH_INFO $fastcgi_path_info;          fastcgi_param SERVER_NAME $vhost;          fastcgi_pass unix:/run/wwsympa.socket;      }      location / {          return 404;      }  }  | 
