Skip to content

Instantly share code, notes, and snippets.

@seanhsu0102
Created February 1, 2016 09:13
Show Gist options
  • Save seanhsu0102/db1dc72bc9f453f784be to your computer and use it in GitHub Desktop.
Save seanhsu0102/db1dc72bc9f453f784be to your computer and use it in GitHub Desktop.
varnish handle 50x status
# 如果碰到 50x 則回 stale content,10 分鐘後會真的看到 50x
if (beresp.status == 500 || beresp.status == 501 || beresp.status == 502 || beresp.status == 503 || beresp.status
== 504) {
set beresp.uncacheable = "True";
set beresp.grace = 10m;
return (abandon);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment