Skip to content

Instantly share code, notes, and snippets.

@gmr
Last active September 21, 2017 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gmr/b858dcfa5e672880ec1548b9d1147b78 to your computer and use it in GitHub Desktop.
Save gmr/b858dcfa5e672880ec1548b9d1147b78 to your computer and use it in GitHub Desktop.
director autodirector_ random {
{
.backend = F_us_east_1_assets_aweberstage_com;
.weight = 100;
}{
.backend = F_us_west_1_assets_aweberstage_com;
.weight = 100;
}
}
sub vcl_recv {
#--FASTLY RECV BEGIN
if (req.restarts == 0) {
if (!req.http.X-Timer) {
set req.http.X-Timer = "S" time.start.sec "." time.start.usec_frac;
}
set req.http.X-Timer = req.http.X-Timer ",VS0";
}
# default conditions
set req.backend = autodirector_;
# end default conditions
if (req.backend.backend == F_us_east_1_assets_aweberstage_com) {
set req.http.host = "us-east-1.assets.aweberstage.com";
}
if (req.backend.backend == F_us_west_1_assets_aweberstage_com) {
set req.http.host = "us-west-1.assets.aweberstage.com";
}
#--FASTLY RECV END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment