Skip to content

Commit

Permalink
Should fix issue where X-http-forwarded-for was not being set.in the …
Browse files Browse the repository at this point in the history
…varnish_frontend recipe.

Also notifies that this varnish_frontend is not a standard/supported recipe in new readme.md file.
  • Loading branch information
jamez01 committed May 25, 2012
1 parent 9f47261 commit b3334dd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cookbooks/varnish_frontend/README.md
@@ -0,0 +1,7 @@
varnish_frontend
================
This recipe puts varnish on port 80, and then pushes the requests to haproxy. This differs from the default varnish recipe, where varnish is proxied to after haproxy.

Notice
=======
This recipe is for example use only. This script modifies the default behaviour of app instances and is not supported by Engine Yard.
4 changes: 4 additions & 0 deletions cookbooks/varnish_frontend/templates/default/app.vcl.erb
Expand Up @@ -9,6 +9,10 @@ backend default {
sub vcl_recv {
set req.grace = 120s;

##### Configure X-Forwarded-For headers:
remove req.http.X-Forwarded-For;
set req.http.X-Forwarded-For = client.ip;

##### Exclude specific urls
#
# This following section can be used to give Varnish regular expression to
Expand Down

0 comments on commit b3334dd

Please sign in to comment.