Created
September 24, 2014 18:58
-
-
Save ranguard/6a97ff39c9e1e0f24503 to your computer and use it in GitHub Desktop.
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
| # http://nginx.org/en/docs/http/request_processing.html | |
| # nginx first searches for the most specific prefix | |
| # location given by literal strings regardless of the | |
| # listed order. In the configuration above the only prefix | |
| # location is “/” and since it matches any request it will | |
| # be used as a last resort. Then nginx checks locations | |
| # given by regular expression in the order listed in the | |
| # configuration file. The first matching expression stops | |
| # the search and nginx will use this location. If no regular | |
| # expression matches a request, then nginx uses the most | |
| # specific prefix location found earlier. | |
| # Things in authors that DO change.. | |
| location ~ /authors/.*/CHECKSUMS$ { | |
| add_header Surrogate-Control max-age=0; | |
| } | |
| location ~ /authors/id/[^/]+ { | |
| add_header Surrogate-Control max-age=0; | |
| } | |
| location ~ /authors/.*/CHECKSUMS$ { | |
| add_header Surrogate-Control max-age=0; | |
| } | |
| # Everything else in /authors/ | |
| location ~ /authors/.*$ { | |
| # Telling fastly to cache for a day | |
| add_header Surrogate-Control max-age=; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment