summaryrefslogtreecommitdiffstats
path: root/roles/lists
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2020-05-17 20:24:09 +0200
committerGuilhem Moulin <guilhem@fripost.org>2020-05-17 20:34:42 +0200
commit3c7c834a37802e5ca5d93a4b4a91dde3264d9f5d (patch)
tree07abe3c01bb29505ceab94b7bdb587c1d3bd09ba /roles/lists
parenta16b003a9bf101234ca988b6e43466a3d6b99bc7 (diff)
nginx: Add Expires: HTTP headers.
Diffstat (limited to 'roles/lists')
-rw-r--r--roles/lists/files/etc/nginx/sites-available/sympa6
1 files changed, 3 insertions, 3 deletions
diff --git a/roles/lists/files/etc/nginx/sites-available/sympa b/roles/lists/files/etc/nginx/sites-available/sympa
index 4cfc11b..89d79f3 100644
--- a/roles/lists/files/etc/nginx/sites-available/sympa
+++ b/roles/lists/files/etc/nginx/sites-available/sympa
@@ -32,43 +32,43 @@ server {
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_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 ^~ /static-sympa/ { expires 30d; try_files $uri =404; alias /usr/share/sympa/static_content/; }
+ location ^~ /css-sympa/ { expires 30d; try_files $uri =404; alias /var/lib/sympa/css/; }
+ location ^~ /pictures-sympa/ { expires 30d; try_files $uri =404; alias /var/lib/sympa/pictures; }
location ~* ^/sympa(?:/|$) {
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; # protect against BREACH
if (!-f /etc/sympa/$vhost/robot.conf) {
return 404;
}