From 74881eb87d9c6e406d67a66c4e49c31a691bc9ec Mon Sep 17 00:00:00 2001 From: OniriCorpe Date: Mon, 11 Sep 2023 23:25:56 +0200 Subject: [PATCH] Fix "Do not use 'add_header'" error --- conf/nginx.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 6603e55..d1d550c 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -26,15 +26,15 @@ location __PATH__/ { location /assets/ { alias __FINAL_PATH__/web/assets/; autoindex off; - expires 5m; - add_header Cache-Control "public"; + # 300 = 5 minutes + more_set_headers "Cache-control: public, max-age=300"; } location /fileserver/ { alias /home/yunohost.app/__APP__/; autoindex off; - expires 1w; - add_header Cache-Control "private, immutable"; + # 604800 = 1 week + more_set_headers "Cache-Control: private, immutable, max-age=604800"; try_files $uri @fileserver; }