Skip to content

Commit 324dbe9

Browse files
committed
only cache 200 response code pages
to keep fastcgi cache from mistakenly caching (and then serving) 5XX error pages and other things it shouldn't, only cache pages with a 200 response code.
1 parent 307a8b3 commit 324dbe9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config/nginx/conf.d/fastcgi.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
fastcgi_cache_path /var/run/nginx-cache levels=1:2 keys_zone=WORDPRESS:50m inactive=60m;
44
fastcgi_cache_key "$scheme$request_method$host$request_uri";
55
fastcgi_cache_use_stale error timeout invalid_header updating http_500 http_503;
6-
fastcgi_cache_valid any 1h;
6+
fastcgi_cache_valid 200 1h;
77

88
fastcgi_buffers 16 16k;
99
fastcgi_buffer_size 32k;

0 commit comments

Comments
 (0)