Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update setting of bereq properties to req #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions prerender.vcl
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ sub vcl_recv {

sub vcl_miss {
if (req.backend == prerender) {
set bereq.http.Host = "service.prerender.io";
set bereq.http.X-Real-IP = client.ip;
set bereq.http.X-Forwarded-For = client.ip;
set req.http.Host = "service.prerender.io";
set req.http.X-Real-IP = client.ip;
set req.http.X-Forwarded-For = client.ip;

# If you're using hosted prerender.io, set your token here to enable
# stat collection.
Expand All @@ -49,7 +49,7 @@ sub vcl_miss {
# FIXME: This would ideally be handled via environment variables.
# I don't think that environment variables are available in Varnish.
# I'm looking into it.
set bereq.http.X-Prerender-Token = std.fileread("/etc/varnish/prerender_token.txt");
set req.http.X-Prerender-Token = std.fileread("/etc/varnish/prerender_token.txt");
}
}

Expand Down