diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-11-23 01:45:53 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-11-23 01:45:53 -0500 |
| commit | 7d9950316368d825510588ded16e5194b4840931 (patch) | |
| tree | 294fa8647e451eae0d741cfeb88d2173b20fd940 /proxy/index.js | |
| parent | 6b37f28e2dba8f191ff5df194e5215399b696faa (diff) | |
add to cart after signin..
Diffstat (limited to 'proxy/index.js')
| -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){ |
