Last active
December 15, 2015 14:29
-
-
Save okor/5274842 to your computer and use it in GitHub Desktop.
Varnish, cache nothing
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
| backend default { | |
| .host = "127.0.0.1"; | |
| .port = "8080"; | |
| } | |
| # Drop any cookies sent to Wordpress. | |
| # except when previewing | |
| # also, cache nothing | |
| sub vcl_recv { | |
| if ( !(req.url ~ "(wp-login|wp-admin|preview=true)") ) { | |
| return (pass); | |
| } | |
| } | |
| # Drop any cookies Wordpress tries to send back to the client. | |
| # except when previewing | |
| sub vcl_fetch { | |
| if ( !(req.url ~ "(wp-login|wp-admin|preview=true)") ) { | |
| unset beresp.http.set-cookie; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment