Created
October 26, 2010 11:27
-
-
Save lerouxb/646728 to your computer and use it in GitHub Desktop.
nginx config for caching urls with parameters ?v=xxxxx or ?r=xxxxx
This file contains hidden or 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
| server { | |
| listen 80; | |
| server_name static.ammo.dev; | |
| access_log /var/log/nginx/ammostatic.access.log; | |
| location / { | |
| root /home/leroux/projects/ammo/static; | |
| if ($args ~* "^[rv]=.*$") { | |
| expires max; | |
| break; | |
| } | |
| if ($is_args = "") { | |
| add_header Cache-Control must-revalidate; | |
| break; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment