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