diff options
Diffstat (limited to 'proxy/index.js')
| -rw-r--r-- | proxy/index.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/proxy/index.js b/proxy/index.js index cac25fd1..425f97f6 100644 --- a/proxy/index.js +++ b/proxy/index.js @@ -8,6 +8,7 @@ var PORT = 9090 var cache = {} var DEBUG = false +var USE_CACHE = false var server = http.createServer().listen(PORT, function(){ console.log('Proxy listening on: http://lvh.me:%s', PORT) @@ -26,7 +27,7 @@ server.on('request', function (req, res){ console.log(req.method, req.url) - if (req.method == 'GET' && req.url in cache) { + if (USE_CACHE && req.method == 'GET' && req.url in cache) { res.writeHeader(200, { 'Content-type': 'application/json' }) res.end(cache[req.url]) return |
