summaryrefslogtreecommitdiffstats
path: root/roles/git/files/etc/nginx/sites-available/git
diff options
context:
space:
mode:
Diffstat (limited to 'roles/git/files/etc/nginx/sites-available/git')
-rw-r--r--roles/git/files/etc/nginx/sites-available/git9
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;