summaryrefslogtreecommitdiff
path: root/proxy
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-11-25 04:08:39 -0500
committerJules Laplace <jules@okfoc.us>2015-11-25 04:08:39 -0500
commitf0c551933c5e725b980014b559d757bee99d0536 (patch)
treeba8f090c42934f3ef601eb8d0e42b4398242fc68 /proxy
parente024c35a2584f5d975b3b4f8fe942bb8e35b6e47 (diff)
fix auth bugs pt 1
Diffstat (limited to 'proxy')
-rw-r--r--proxy/index.js3
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