In order to make debugging an nginx setup easier it would be nice to add a header to the http response indicating the cache status (HIT/MISS). Is there a way to do this with a simple nginx cache setup such as this?
server { # ... location / { proxy_cache my_cache; proxy_pass http://my_upstream; } }
I found basic docs for adding a header using add_header but not how to dynamically change the response based on the cache status.
1.4m articles
1.4m replys
5 comments
57.0k users