From 212606febdba7b0c7e6f69480788535a009ff178 Mon Sep 17 00:00:00 2001 From: Gurkengewuerz Date: Tue, 14 Mar 2023 20:30:32 +0100 Subject: [PATCH] fix: no cache --- assets/nginx/default.conf | 16 ++++++++++------ nitro/nginx.conf | 6 ++---- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/assets/nginx/default.conf b/assets/nginx/default.conf index 8e556f4..39d5e76 100644 --- a/assets/nginx/default.conf +++ b/assets/nginx/default.conf @@ -28,14 +28,18 @@ server { location /nginx { - return 404; + return 403; } - location ~ thumbnail { + location /translation { + return 403; + } + + location ~* (.*/thumbnail)/(.+\.png)$ { # kill cache - add_header Cache-Control 'no-store, no-cache'; - expires off; + expires -1; etag off; + add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; include conf.d/corsdefault.template; } @@ -50,9 +54,9 @@ server { location ~*\.(json)$ { # kill cache - add_header Cache-Control 'no-store, no-cache'; - expires off; + expires -1; etag off; + add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; include conf.d/corsdefault.template; } diff --git a/nitro/nginx.conf b/nitro/nginx.conf index f1839bf..abd6eb0 100644 --- a/nitro/nginx.conf +++ b/nitro/nginx.conf @@ -5,11 +5,9 @@ server { location / { # kill cache - add_header Last-Modified $date_gmt; - add_header Cache-Control 'no-store, no-cache'; - if_modified_since off; - expires off; + expires -1; etag off; + add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; root /usr/share/nginx/html; index index.html index.htm;