From 270877fb9929aa6e8277e50d7c2e77901aa3ce0b Mon Sep 17 00:00:00 2001 From: Nicolas CARPi Date: Sat, 5 Jun 2021 17:48:45 +0200 Subject: [PATCH 1/2] add long cache policy for assets --- src/nginx/common.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nginx/common.conf b/src/nginx/common.conf index b2efdb0..e337331 100644 --- a/src/nginx/common.conf +++ b/src/nginx/common.conf @@ -52,9 +52,11 @@ location / { location ~ /\. { access_log off; log_not_found off; deny all; } # disable access log for assets -location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { +location ~* \.(js|css|png|jpg|jpeg|gif|ico|map|woff)$ { access_log off; log_not_found off; + expires 1y; + add_header Cache-Control "public, no-transform"; } # to use the RESTful api From c1a76e92301c967fc444d96c99d1701212b747f1 Mon Sep 17 00:00:00 2001 From: Nicolas CARPi Date: Wed, 16 Jun 2021 20:55:23 +0200 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 3 +++ Dockerfile | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78955d4..a7cc121 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Container image version # Note: the version here is from Dockerfile:ELABIMG_VERSION not the tagged one +# 2.5.1 +* Add long caching for assets + # 2.5.0 * Add brotli compression to nginx for assets diff --git a/Dockerfile b/Dockerfile index 9fd66b2..e135b8f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ ARG ELABFTW_VERSION=hypernext ENV ELABFTW_VERSION $ELABFTW_VERSION # this is versioning for the container image -ARG ELABIMG_VERSION=2.5.0 +ARG ELABIMG_VERSION=2.5.1 ENV ELABIMG_VERSION $ELABIMG_VERSION ARG S6_OVERLAY_VERSION=2.2.0.1