Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mattiasgeniar/varnish-3.0-configu…
Browse files Browse the repository at this point in the history
…ration-templates
  • Loading branch information
mattiasgeniar committed Nov 22, 2013
2 parents 767982a + 4730459 commit b7bb6a5
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions production.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,14 @@ sub vcl_recv {
# Send Surrogate-Capability headers to announce ESI support to backend
set req.http.Surrogate-Capability = "key=ESI/1.0";

# Include custom vcl_recv logic
include "custom.recv.vcl";

if (req.http.Authorization) {
# Not cacheable by default
return (pass);
}

# Include custom vcl_recv logic
include "custom.recv.vcl";

return (lookup);
}

Expand Down Expand Up @@ -281,9 +281,6 @@ sub vcl_error {
} elsif (obj.status >= 400 && obj.status <= 499 ) {
# use 404 error page for 4xx error
include "conf.d/error-404.vcl";
} elsif (obj.status <= 200 && obj.status >= 299 ) {
# for other errors (not 5xx, not 4xx and not 2xx)
include "conf.d/error.vcl";
} elseif (obj.status == 720) {
# We use this special error status 720 to force redirects with 301 (permanent) redirects
# To use this, call the following from anywhere in vcl_recv: error 720 "http://host/new.html"
Expand All @@ -297,6 +294,7 @@ sub vcl_error {
set obj.http.Location = obj.response;
return (deliver);
} else {
# for other errors (not 5xx, not 4xx and not 2xx)
include "conf.d/error.vcl";
}

Expand Down

0 comments on commit b7bb6a5

Please sign in to comment.