diff options
Diffstat (limited to 'proxy')
| -rw-r--r-- | proxy/index.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/proxy/index.js b/proxy/index.js index 27d3156e..cac25fd1 100644 --- a/proxy/index.js +++ b/proxy/index.js @@ -54,10 +54,12 @@ server.on('request', function (req, res){ res.writeHeader(server_res.statusCode, server_res.headers) server_res.pipe(res) - cache[req.url] = '' - server_res.on('data', function(s){ - cache[req.url] += s.toString() - }) + if (! options.headers['x-yoox-cart-token']) { + cache[req.url] = '' + server_res.on('data', function(s){ + cache[req.url] += s.toString() + }) + } if (DEBUG) { server_res.on('data', function(s){ |
