Permalink
Browse files

raw synthetic response

  • Loading branch information...
comotion committed Dec 5, 2010
1 parent 5f15653 commit 290e3a5de6bee34fc18ef0dac2a54847b6099734
Showing with 6 additions and 1 deletion.
  1. +6 −1 vcl/main.vcl
View
@@ -57,6 +57,7 @@ include "/etc/varnish/security/handlers.vcl";
* 803 - Restart, forward to backend honey
* 804 - Synthetic response
* 805 - Attempt to drop or reset the request (not implemented yet)
+ * 808 - Raw synthetic deliver
*/
sub vcl_error {
# are we insecure?
@@ -99,9 +100,13 @@ sub vcl_error {
</body></html>
"};
return (deliver);
- } elsif (obj.status == 805){
+ } elsif (obj.status == 805) {
set obj.status = 501;
set obj.response = "Get outta here";
+ } elsif (obj.status == 808) {
+ set obj.status = 200;
+ set obj.response = "OK";
+ synthetic req.http.X-SEC-Response;
}
# fallthrough to other vcl_error's
}

0 comments on commit 290e3a5

Please sign in to comment.