diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2020-05-17 17:03:00 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2020-05-17 18:30:03 +0200 |
commit | caf1eb7d7b3082a6b3a335e59cdd5813b82f3966 (patch) | |
tree | 81cf1312b8456c604df93d12d1c58a1dd22b1fea /roles/git/files/etc/nginx | |
parent | e75fdedc7267b4918dbf4ebe10e66f2ac90ab313 (diff) |
git, wiki, website: Improve gzip support.
Diffstat (limited to 'roles/git/files/etc/nginx')
-rw-r--r-- | roles/git/files/etc/nginx/sites-available/git | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/roles/git/files/etc/nginx/sites-available/git b/roles/git/files/etc/nginx/sites-available/git index 7ad765f..0aa4345 100644 --- a/roles/git/files/etc/nginx/sites-available/git +++ b/roles/git/files/etc/nginx/sites-available/git @@ -33,9 +33,13 @@ server { ssl_certificate_key ssl/git.fripost.org.key; include snippets/git.fripost.org.hpkp-hdr; + gzip on; + gzip_vary on; + gzip_min_length 256; + gzip_types application/javascript application/json application/xml image/svg+xml image/x-icon text/css text/plain; + location ^~ /static/ { alias /usr/share/cgit/; - expires 30d; } # disallow push over HTTP/HTTPS @@ -58,10 +62,11 @@ server { fastcgi_pass unix:/run/git-http-backend.socket; } + location = /robots.txt { root /usr/share/cgit; } + location = /favicon.ico { root /usr/share/cgit; } # send all other URLs to cgit location / { - gzip off; fastcgi_param SCRIPT_FILENAME /usr/lib/cgit/cgit.cgi; fastcgi_param PATH_INFO $uri; fastcgi_param CONTENT_TYPE $content_type; |