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) {
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) {