From ac9799fab5cd3a30d32678b176ab43fa9edd1a05 Mon Sep 17 00:00:00 2001 From: colben Date: Sat, 19 Aug 2023 23:22:59 +0800 Subject: [PATCH] update --- content/post/nginx.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/content/post/nginx.md b/content/post/nginx.md index 27132b5..5ab3ff1 100644 --- a/content/post/nginx.md +++ b/content/post/nginx.md @@ -97,6 +97,15 @@ location ^~ /share/ { } ``` +## 禁止浏览器缓存 +```nginx +loaction ^~ /xxxxweb/ { + add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0"; + expires off; + etag off; +} +``` + ## 反向代理负载均衡 - /etc/nginx/conf.d/upstream.conf ```nginx