summaryrefslogtreecommitdiff
path: root/modules/proxy
diff options
context:
space:
mode:
Diffstat (limited to 'modules/proxy')
-rw-r--r--modules/proxy/proxy.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/proxy/proxy.js b/modules/proxy/proxy.js
index 49caf54..ccec53a 100644
--- a/modules/proxy/proxy.js
+++ b/modules/proxy/proxy.js
@@ -29,9 +29,15 @@ function objectFromList(l){
}
module.exports=function(app,io,moddir){
- var iddict=objectFromList(
+ var iddict;
+ try {
+ iddict=objectFromList(
fs.readFileSync(moddir+"/idfile.txt").toString()
.split("\n").map(function(r){return r.split(" ");}));
+ } catch (e) {
+ console.error(e);
+ return false;
+ }
app.all("/proxy/:id/*",function(req,res){
var id=req.params.id;