Add default values
This commit is contained in:
parent
140a142243
commit
f6b96f38ff
2 changed files with 8 additions and 8 deletions
|
|
@ -36,5 +36,5 @@ IP_REFRESH_INTERVAL=80
|
||||||
# Report IP addresses to api.sefinek.net to support the development of the repository at https://github.com/sefinek24/Malicious-IP-Addresses. SEFINEK_API_SECRET is required if true.
|
# Report IP addresses to api.sefinek.net to support the development of the repository at https://github.com/sefinek24/Malicious-IP-Addresses. SEFINEK_API_SECRET is required if true.
|
||||||
REPORT_TO_SEFINEK_API=true
|
REPORT_TO_SEFINEK_API=true
|
||||||
|
|
||||||
# How often should the log (reported_ips.csv) be analyzed and sent to the Sefinek API? In minutes.
|
# How often should the log (reported_ips.csv) be analyzed and sent to the Sefinek API? In hours.
|
||||||
SEFINEK_API_INTERVAL=60
|
SEFINEK_API_INTERVAL=1
|
||||||
12
config.js
12
config.js
|
|
@ -1,18 +1,18 @@
|
||||||
const CYCLE_INTERVAL = process.env.NODE_ENV === 'production' ?
|
const CYCLE_INTERVAL = process.env.NODE_ENV === 'production' ?
|
||||||
parseInt(process.env.CYCLE_INTERVAL) * 60 * 1000 : 8 * 1000;
|
parseInt(process.env.CYCLE_INTERVAL || '120') * 60 * 1000 : 8 * 1000;
|
||||||
|
|
||||||
const REPORTED_IP_COOLDOWN_MS = parseInt(process.env.REPORTED_IP_COOLDOWN_MS) * 60 * 60 * 1000;
|
const REPORTED_IP_COOLDOWN_MS = parseInt(process.env.REPORTED_IP_COOLDOWN_MS || '6') * 60 * 60 * 1000;
|
||||||
|
|
||||||
const MAX_URL_LENGTH = parseInt(process.env.MAX_URL_LENGTH);
|
const MAX_URL_LENGTH = parseInt(process.env.MAX_URL_LENGTH || '920');
|
||||||
|
|
||||||
const SUCCESS_COOLDOWN_MS = parseInt(process.env.SUCCESS_COOLDOWN_MS);
|
const SUCCESS_COOLDOWN_MS = parseInt(process.env.SUCCESS_COOLDOWN_MS || '2') * 1000;
|
||||||
|
|
||||||
const IP_REFRESH_INTERVAL = parseInt(process.env.IP_REFRESH_INTERVAL) * 60 * 1000;
|
const IP_REFRESH_INTERVAL = parseInt(process.env.IP_REFRESH_INTERVAL || '80') * 60 * 1000;
|
||||||
|
|
||||||
const REPORT_TO_SEFINEK_API = process.env.REPORT_TO_SEFINEK_API === 'true';
|
const REPORT_TO_SEFINEK_API = process.env.REPORT_TO_SEFINEK_API === 'true';
|
||||||
|
|
||||||
const SEFINEK_API_INTERVAL = process.env.NODE_ENV === 'production' ?
|
const SEFINEK_API_INTERVAL = process.env.NODE_ENV === 'production' ?
|
||||||
parseInt(process.env.SEFINEK_API_INTERVAL) * 60 * 1000 : 5 * 1000;
|
parseInt(process.env.SEFINEK_API_INTERVAL || '1') * 60 * 60 * 1000 : 5 * 1000;
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
CYCLE_INTERVAL,
|
CYCLE_INTERVAL,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue