Welcome! Log In Create A New Profile


proxy_cache 404 doesn't add headers

May 18, 2011 04:20PM

In nginx 1.0.2 on Fedora, I'm using the proxy_cache in conjunction with add_header to add the following header with cache-status (MISS,EXPIRED, etc.) after the cache check:

add_header X-Cache "$upstream_cache_status,$upstream_status,$upstream_addr";

This works as expected for http status codes 200, 301, 302, but fails to work for 404.

I've verified that the cache is actually working for 404 requests (upstream sees no requests), but the extra add_header fails to get added.

Any insight onto this behavior would be great.

Thank you,
Matt Mankins
Subject Author Posted

proxy_cache 404 doesn't add headers

mankins May 18, 2011 04:20PM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 72
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready