diff --git a/README.md b/README.md index 637bf9018..120a204ac 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Iframely takes your URL and returns its metadata. If supported on the URL, we'll This package includes specific domain parsers for most popular publishers. YouTube, Facebook, Instagram, Twitter, SoundCloud, Google Maps, TED, Twitch and many more. See `/plugins/domains` folder. In addition, we cover many domains by whitelisting media through the generic publishing protocols: [oEmbed](http://oembed.com/), [Open Graph](http://ogp.me/), [Twitter Cards](https://dev.twitter.com/docs/cards) and microformats. For the rest of URLs, you'll include have metadata and thumbnail images from those protocols. Use it to create your own URL previews. -Iframely's [whitelist file](https://iframely.com/qa/whitelist.json) is fetched from our central database. The changes are synced automatically to your instance by default. But you replace that with [your own whitelist](https://iframely.com/docs/whitelist-format) file. There should be over 1500 domains covered by the central whitelist. +Iframely's [whitelist file](https://iframely.com/qa/domains.json) is fetched from our central database. The changes are synced automatically to your instance by default. But you replace that with [your own whitelist](https://iframely.com/docs/whitelist-format) file. There should be over 1500 domains covered by the central whitelist. ## Breaking changes in version 2.0.0 diff --git a/config.js b/config.js index f73f3bd56..ac5619ac7 100644 --- a/config.js +++ b/config.js @@ -20,7 +20,7 @@ use_http2: true, DEBUG: false, - WHITELIST_URL: 'https://iframely.com/qa/whitelist.json', + WHITELIST_URL: 'https://iframely.com/qa/domains.json', WHITELIST_URL_RELOAD_PERIOD: 60 * 60 * 1000, // will reload WL every hour, if no local files are found in /whitelist folder WHITELIST_WILDCARD: {}, diff --git a/config.local.js.SAMPLE b/config.local.js.SAMPLE index 66eb3a630..5c78c4f8f 100644 --- a/config.local.js.SAMPLE +++ b/config.local.js.SAMPLE @@ -322,7 +322,7 @@ export default { */ // The list of regexs to be ignored. Iframely will return 417 - // At minimum, keep your localhosts blacklisted to avoid SSRF + // At minimum, keep your localhosts ignored to avoid SSRF IGNORE_DOMAINS_RE: [ /^https?:\/\/127\.0\.0\.1/i, /^https?:\/\/localhost/i, diff --git a/lib/whitelist.js b/lib/whitelist.js index ed01ec165..c4fd81ee5 100644 --- a/lib/whitelist.js +++ b/lib/whitelist.js @@ -237,7 +237,7 @@ addWildcard(); - log('Whitelist activated. Domains, including blacklisted:', Object.keys(data.domains).length); + log('Domains list activated.', Object.keys(data.domains).length, 'domains, including disabled ones'); } function readWhitelist(filename) { @@ -245,10 +245,10 @@ var newWhitelist; try { - console.log('Loading whitelist:', filename); + console.log('Loading domains file:', filename); newWhitelist = JSON.parse(fs.readFileSync(filename, 'utf8')); } catch(ex) { - console.log("Error loading whitelist:", ex); + console.log("Error parsing domains list:", ex); } if (newWhitelist) { @@ -293,7 +293,7 @@ if (filename && filename != currentWhitelistFilename) { readWhitelist(filename); } else { - console.log('No local whitelist file detected...'); + console.log('No local domains file detected...'); addWildcard(); } @@ -339,7 +339,7 @@ if (!currentWhitelistFilename && CONFIG.WHITELIST_URL && CONFIG.WHITELIST_URL_RELOAD_PERIOD) { - log("Loading whitelist from " + CONFIG.WHITELIST_URL); + log("Loading domains list from " + CONFIG.WHITELIST_URL); var options = { uri: CONFIG.WHITELIST_URL, @@ -363,13 +363,13 @@ request(utils.prepareRequestOptions(options), function(error, r, newWhitelist) { if (error) { - console.error('Error loading whitelist from ' + CONFIG.WHITELIST_URL + ' : ' + error); + console.error('Error loading domains list from ' + CONFIG.WHITELIST_URL + ' : ' + error); } else if (r.statusCode === 500) { - console.error('Error loading whitelist from ' + CONFIG.WHITELIST_URL + ' : ' + newWhitelist); + console.error('Error loading domains list from ' + CONFIG.WHITELIST_URL + ' : ' + newWhitelist); } else if (r.statusCode === 304) { log('Whitelist respond: 304 (not modified)'); } else if (!newWhitelist || typeof newWhitelist === 'string') { - console.error('Error loading whitelist from ' + CONFIG.WHITELIST_URL + ' : incorrect data: ' + newWhitelist); + console.error('Error loading domains list from ' + CONFIG.WHITELIST_URL + ' : incorrect data: ' + newWhitelist); } else { whitelistLastModified = r.headers['last-modified'];