From ca97838695ab96a44f864d62dcb5cca2fef00fcb Mon Sep 17 00:00:00 2001 From: Ray Schamp Date: Fri, 27 May 2016 13:44:56 -0400 Subject: [PATCH] Fix cache condition request The response from the request condition includes fields we don't want to send up with the cache condition --- bin/configure-fastly.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/configure-fastly.js b/bin/configure-fastly.js index 8366960be..036412657 100644 --- a/bin/configure-fastly.js +++ b/bin/configure-fastly.js @@ -153,10 +153,12 @@ async.auto({ ); }], passCacheCondition: ['version', 'passRequestCondition', function (cb, results) { - var condition = defaults( - {name: PASS_CACHE_CONDITION_NAME, type: 'CACHE'}, - results.passRequestCondition - ); + var condition = { + name: PASS_CACHE_CONDITION_NAME, + type: 'CACHE', + statement: results.passRequestCondition.statement, + priority: results.passRequestCondition.priority + }; fastly.setCondition(results.version, condition, cb); }], passCacheSettingsCondition: ['version', 'passCacheCondition', function (cb, results) {