Fix nginx configuration

```
location ~* ^.+\.(css|png|ico)$ {
  expires 30d;
}
```

^ that parameter causes that .css files cannot be explored
This commit is contained in:
Jesús 2021-05-23 16:04:01 -05:00
parent 64bc0e7de3
commit 764a1cbb69
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766

View File

@ -199,19 +199,34 @@ EOF
root /usr/share/webapps/cgit; root /usr/share/webapps/cgit;
try_files \$uri @cgit; try_files \$uri @cgit;
location ~* ^.+\.(css|png|ico)$ { location @cgit {
expires 30d; include fastcgi_params;
# Path to the CGI script that comes with cgit
fastcgi_param SCRIPT_FILENAME \$document_root/cgit.cgi;
fastcgi_param PATH_INFO \$uri;
fastcgi_param QUERY_STRING \$args;
fastcgi_param QUERY_INFO \$uri;
fastcgi_param HTTP_HOST \$server_name;
# Path to the socket file that is created/used by fcgiwrap
fastcgi_pass unix:/run/fcgiwrap/fcgiwrap.socket;
} }
location / { # Enable compression for JS/CSS/HTML, for improved client load times.
index cgit.cgi; # It might be nice to compress JSON/XML as returned by the API, but
fastcgi_param SCRIPT_FILENAME \$document_root/cgit.cgi; # leaving that out to protect against potential BREACH attack.
fastcgi_pass unix:/run/fcgiwrap/fcgiwrap.socket; gzip on;
fastcgi_param HTTP_HOST \$server_name; gzip_vary on;
fastcgi_param PATH_INFO \$uri;
fastcgi_param QUERY_INFO \$uri; gzip_types # text/html is always compressed by HttpGzipModule
include "fastcgi_params"; text/css
} application/javascript
font/truetype
font/opentype
application/vnd.ms-fontobject
image/svg+xml;
} }
EOF EOF