Skip to content

Commit

Permalink
Merge pull request mattiasgeniar#31 from carlalexander/patch-1
Browse files Browse the repository at this point in the history
Prevent CGI proxy hack
  • Loading branch information
mattiasgeniar authored Jul 19, 2016
2 parents 476adbb + 9614f76 commit 1489fd6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions default.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ sub vcl_recv {

# Normalize the header, remove the port (in case you're testing this on various TCP ports)
set req.http.Host = regsub(req.http.Host, ":[0-9]+", "");

# Remove the proxy header (see https://httpoxy.org/#mitigate-varnish)
unset req.http.proxy;

# Normalize the query arguments
set req.url = std.querysort(req.url);
Expand Down

0 comments on commit 1489fd6

Please sign in to comment.