Skip to content

Instantly share code, notes, and snippets.

@jstangroome
Created August 18, 2015 01:02
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jstangroome/e64c97ca87336647e517 to your computer and use it in GitHub Desktop.
sub vcl_recv {
if ( req.http.X-Forwarded-Proto !~ "(?i)https") {
return (synth(750, ""));
}
}
sub vcl_synth {
if (resp.status == 750) {
set resp.status = 301;
set resp.http.Location = "https://blog.stangroome.com" + req.url;
return(deliver);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment