Skip to content

Commit d6e71bc

Browse files
author
Justin Rainbow
committed
Fixed an issue with loading the IP whitelist and adding a .gitignore
1 parent 594ff34 commit d6e71bc

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
config/allow_ip_list
2+
config/black_list

proxy.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ function update_list(msg, file, mapf, collectorf) {
2222
fs.stat(file, function(err, stats) {
2323
if (!err) {
2424
sys.log(msg);
25-
collectorf(fs.readFileSync(file)
26-
.split('\n')
25+
fs.readFile(file, function(err, data) {
26+
collectorf(data.toString().split("\n")
2727
.filter(function(rx) { return rx.length })
2828
.map(mapf));
29+
});
2930
}
3031
else {
3132
sys.log("File '" + file + "' was not found.");
@@ -100,7 +101,6 @@ function server_cb(request, response) {
100101
});
101102
request.addListener('end', function() {
102103
proxy_request.end();
103-
proxy_request.close();
104104
});
105105
}
106106

0 commit comments

Comments
 (0)