Hacker News new | ask | show | jobs
by djengineerllc 4372 days ago
So this looks like it will be pretty neat. I have it compiled and running. It seems to be mostly working. I did run into some issues.

Like for instance, in the bundle.js file there is a line of code that has this "$window.location.origin + '/config.json'"

the window.location.origin is not supported in IE. You may want to add something like this to your javascript for IE support:

if (!window.location.origin) { window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: ''); }

Also, when I try to add an IP to ban, I am getting an error "Unable to get property 'indexOf' of undefined or null reference".

After looking at it, it looks like I'm getting an empty IPList from the fail2rest api.

So the code dies here "activeJail.data.IPList.indexOf(ipAddress) === -1" since the IPList is null. Maybe I have something misconfigured for the fail2rest, but I'm am not currently sure yet.

Also, the adding and deleting of regexes does work fine! :)

UPDATE: Looks like my updates are not working, but the reading of the config file is working. I'm thinking it might be something with my fail2rest...