Fix cache condition request

The response from the request condition includes fields we don't want to send up with the cache condition
This commit is contained in:
Ray Schamp 2016-05-27 13:44:56 -04:00
parent 29ea1abd04
commit ca97838695

View file

@ -153,10 +153,12 @@ async.auto({
); );
}], }],
passCacheCondition: ['version', 'passRequestCondition', function (cb, results) { passCacheCondition: ['version', 'passRequestCondition', function (cb, results) {
var condition = defaults( var condition = {
{name: PASS_CACHE_CONDITION_NAME, type: 'CACHE'}, name: PASS_CACHE_CONDITION_NAME,
results.passRequestCondition type: 'CACHE',
); statement: results.passRequestCondition.statement,
priority: results.passRequestCondition.priority
};
fastly.setCondition(results.version, condition, cb); fastly.setCondition(results.version, condition, cb);
}], }],
passCacheSettingsCondition: ['version', 'passCacheCondition', function (cb, results) { passCacheSettingsCondition: ['version', 'passCacheCondition', function (cb, results) {