Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[fix] Encoding data

  • Loading branch information...
commit e662bc8f6ff06aa93a33ca1656162f914d9bdacf 1 parent d48b712
@alejandro alejandro authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 proxy/proxy.js
View
4 proxy/proxy.js
@@ -58,12 +58,12 @@ fs.watchFile(config.opt.proxy_table_file, function (oldts, newts) {
});
function readIP (){
- return fs.readFile(__dirname + '/ips.json', function(err, data){
+ return fs.readFile(__dirname + '/ips.json','utf8', function(err, data){
if (err) {
log.info('Can\'t load the ips (read)');
} else {
try {
- bannedIPs = data;
+ bannedIPs = JSON.parse(data);
log.info('ips updated');
} catch (exc) {
log.warn(exc);
Please sign in to comment.
Something went wrong with that request. Please try again.