Set headers with set method

This commit is contained in:
Raul Ochoa
2015-09-17 02:03:09 +02:00
parent beabe48aec
commit ef86bacf7f
7 changed files with 29 additions and 28 deletions
+2 -2
View File
@@ -17,8 +17,8 @@ module.exports = SurrogateKeysCache;
*/
SurrogateKeysCache.prototype.tag = function(response, cacheObject) {
var newKey = cacheObject.key();
response.header('Surrogate-Key', appendSurrogateKey(
response.header('Surrogate-Key'),
response.set('Surrogate-Key', appendSurrogateKey(
response.get('Surrogate-Key'),
Array.isArray(newKey) ? cacheObject.key().join(' ') : newKey
));