Cloudflare-WAF-To-AbuseIPDB/scripts/headers.js
2024-08-16 15:17:06 +02:00

18 lines
No EOL
510 B
JavaScript

const { name, version, homepage } = require('../package.json');
const userAgent = `Mozilla/5.0 (compatible; ${name}/${version}; +${homepage})`;
const CLOUDFLARE = {
'User-Agent': userAgent,
'Content-Type': 'application/json',
'Authorization': `Bearer ${process.env.CLOUDFLARE_API_KEY}`,
'X-Auth-Email': process.env.CLOUDFLARE_EMAIL
};
const ABUSEIPDB = {
'User-Agent': userAgent,
'Content-Type': 'application/json',
'Key': process.env.ABUSEIPDB_API_KEY
};
module.exports = { CLOUDFLARE, ABUSEIPDB };