Cloudflare-WAF-To-AbuseIPDB/scripts/headers.js
2024-10-31 21:05:54 +01:00

18 lines
No EOL
512 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 };