2011年2月17日星期四

HEAD request breaks fastxgi_cache

I have registered with Uptime Robot. You can have it monitor a URL. It
does this by sending a HEAD request every 5 to 10 minutes and checking
for an OK response. This request triggers the fastcgi cache with an
empty content. If I understand the wiki correctly I can't not cache HEAD
requests (http://wiki.nginx.org/HttpFcgiModule#fastcgi_cache_methods).

The only (dubious) fix this I can see at the moment is to add an IP
exception to the nginx config. However that effectively leaves the site
open to abuse by someone being malicious.

Is there a way I can just cache GET requests? Or requests with body
content size > 0? Or is there a better way?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,176381,176381#msg-176381


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

没有评论:

发表评论