Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var ccf = (config.API.cloudflare.enable == "yes"
? require("cloudflare").createClient(config.API.cloudflare)
: null
);
var ncf = require("node_cloudflare");
var debug = require("debug")("bird3:cloudflare");
module.exports = function(app) {
// This is the local app instance, invoked before vhost.
debug("BIRD3 CloudFlare Worker: Starting...");
if(ccf!=null) {
debug("BIRD3 CloudFlare Worker: CF client enabled!");
}
ncf.load(function(error, fs_error){
if(error){
throw error;
cfcli.init = function (token, email) {
cfcli.cloudflare = require('cloudflare').createClient({
email: email,
token: token
});
};