Created
May 25, 2018 09:33
-
-
Save stefanoverna/50384c771d775ac37f230ae52e0173b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub vcl_hash { | |
#FASTLY hash | |
set req.hash += req.url; | |
set req.hash += req.http.host; | |
set req.hash += req.http.Authorization; | |
if (req.request == "POST" && req.postbody) { | |
set req.hash += req.postbody; | |
} | |
log {"syslog url"} req.url " host " req.http.host " authorization " req.http.Authorization " request " req.request " postbody " req.postbody; | |
return(hash); | |
} | |
sub vcl_fetch { | |
#FASTLY fetch | |
unset beresp.http.Cache-Control; | |
unset beresp.http.Etag; | |
} | |
sub vcl_recv { | |
#FASTLY recv | |
set req.http.host = "graphql.datocms.com"; | |
if (req.request == "POST") { | |
return(lookup); | |
} | |
return(lookup); | |
} | |
sub vcl_deliver { | |
#FASTLY deliver | |
set resp.http.X-VLC-Version = "6"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment