Created
May 3, 2013 01:26
-
-
Save caquino/5506639 to your computer and use it in GitHub Desktop.
Do not cache 0-byte files on NGINX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
map $upstream_http_content_length $flag_cache_empty { | |
default 0; | |
0 1; | |
} | |
server { | |
.... | |
location / { | |
... | |
proxy_no_cache $flag_cache_empty; | |
proxy_cache_bypass $flag_cache_empty; | |
... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment