From f0c551933c5e725b980014b559d757bee99d0536 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 25 Nov 2015 04:08:39 -0500 Subject: fix auth bugs pt 1 --- proxy/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'proxy') 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 -- cgit v1.2.3-70-g09d2