Php 禁用单个页面的nginx缓存会导致404
我有一些不想缓存的页面:Php 禁用单个页面的nginx缓存会导致404,php,nginx,caching,fastcgi,Php,Nginx,Caching,Fastcgi,我有一些不想缓存的页面: example.com/login example.com/register example.com/password-reset 我的nginx配置中有这个规则,但它没有禁用缓存,而是为指定的url路径抛出nginx 404错误 location ~ ^/(password-reset|register|login)/ { add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-
location ~ ^/(password-reset|register|login)/ {
add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
if_modified_since off;
expires off;
etag off;
proxy_no_cache 1;
proxy_cache_bypass 1;
}
我有完全相同的问题,我找不到关于如何在没有此404错误的情况下正确禁用一个页面/端点的缓存的任何帮助。我有完全相同的问题,我找不到关于如何在没有此404错误的情况下正确禁用一个页面/端点的缓存的任何帮助。