Skip to content

Commit 189b05f

Browse files
committed
Whitelist is available to everyone. Happy 2015!
1 parent b787142 commit 189b05f

File tree

6 files changed

+39
-55
lines changed

6 files changed

+39
-55
lines changed

README.md

+22-9
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,48 @@
11
# Iframely API for Responsive Web Embeds
22

3-
Iframely is fast and simple HTTP API for responsive web embeds. It also can be used as Node.js library.
3+
Iframely is fast and simple HTTP API for responsive web embeds and semantic meta. The API covers well [over 1600 domains](https://iframely.com/try) through 150 custom domain plugins and generic parsers for [oEmbed](http://oembed.com/), [Open Graph](http://ogp.me/) and [Twitter Cards](https://dev.twitter.com/docs/cards), powered by Iframely's whitelist.
44

5-
HTTP API are available as [oEmbed](https://iframely.com/docs/oembed-api) or [Iframely API](https://iframely.com/docs/iframely-api) formats. Iframely formats basically mimics the `<head>` section of the page with its `meta` and `links` elements.
5+
The whitelisting is manual process, and we do every-day manual regression testing to ensure integrity. [Submit your domain](https://iframely.com/qa/request), if you publish embeds.
6+
7+
HTTP API are available as [oEmbed](https://iframely.com/docs/oembed-api) or [Iframely API](https://iframely.com/docs/iframely-api) formats. To make it simple to understand, Iframely format mimics the `<head>` section of the page with its `meta` and `links` elements.
68

79
In response to `url` request, APIs returns you the embeds and meta for a requested web page. Below are samples from [hosted API](https://iframely.com), just to show you the format:
810

911
- [>> Here’s API call for Coub video](http://iframe.ly/ACcM3Y.json)
1012
- [>> Same one, but as oEmbed](http://iframe.ly/ACcM3Y.oembed)
1113

12-
Iframely does it by parsing [oEmbed](http://oembed.com/), [Open Graph](http://ogp.me/) and [Twitter Cards](https://dev.twitter.com/docs/cards) and general meta on the original page. Or by using specific domain plugins in the package.
14+
Iframely can also be used as Node.js library.
15+
16+
17+
## Get started:
1318

14-
There are over 150 custom domains included as open-source. Plus, there is a whitelist option for oEmbed, Open Graph and Twitter Cards that acts like a gigantic plugin for generic parsers. You can [create your own whitelist](https://iframely.com/docs/whitelist-format) or [get one](https://iframely.com/plans) with [over 1600 domains](https://iframely.com/try) from Iframely. By default, our whitelist with Top 100 domains is included for free with your package.
19+
The simplest way to see Iframely in action is by using our [Chrome plugin](https://chrome.google.com/webstore/detail/iframely-url-previews/bbafbcjnlgfbemjemgliogmfdlkocjmi). This way you will see the embeds on your (or any really) site right away (but not on GitHub due to Content-Security-Policy, sorry).
1520

16-
## Read Next:
21+
Or, [try Iframely demo with your very own or any other Twitter feed](https://iframely.com/try). Don't forget to click on results to see the embed codes.
1722

18-
- [Try Iframely demo with any Twitter feed](https://iframely.com/try)
23+
To get started with the APIs:
24+
25+
- There's a hosted version of these APIs at [iframely.com](https://iframely.com), if you'd rather rely on the cloud
1926
- [API in Iframely format](https://iframely.com/docs/iframely-api) (`iframe=true` option is only available for hosted API)
2027
- [API in oEmbed format](https://iframely.com/docs/oembed-api)
21-
- [About Link Rels, Types and Media Queries](https://iframely.com/docs/links) (players, thumbnails, app, reader, survey, slideshow, etc)
28+
- [About Link Rels, Types and Media Queries](https://iframely.com/docs/links) in Iframely format (players, thumbnails, app, reader, survey, slideshow, etc)
2229
- [META semantics](https://iframely.com/docs/meta) Iframely API scrapes for you.
2330
- [How to install & configure](https://iframely.com/docs/host) your open-source host.
2431

32+
33+
## Use APIs in your open-source project
34+
35+
We have provided specific endpoint for the use in open source projects. Read more at [oembedapi.com](http://oembedapi.com).
36+
37+
38+
2539
## Contribute
2640

2741
We put our best effort to maintain Iframely and all its domain parsers. Please, feel free to [reach us on Twitter](http://twitter.com/iframely) or to [submit an issue](https://github.com/itteco/iframely/issues) if you have any suggestions. Our support email is support at iframely.com
2842

2943
Fork and pull-request, if you'd like to add more plugins and/or contribute fixes or improvements. By doing so, you make your work available under the same MIT license.
3044

31-
If you are a publisher and would like to make your embeds available under [Iframely Protocol](http://iframely.com/oembed2) (and thus distributed through this open-source gateway) - please, [add your domain to the our DB](http://iframely.com/qa/request).
32-
45+
If you see an error in our domains whitelist (you can [debug URLs here](http://iframely.com/debug)), please ping us and we'll fix it in no time.
3346

3447

3548
## License & Authors

config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
var config = {
99

10-
WHITELIST_URL: 'http://iframely.com/qa/top100.json',
10+
WHITELIST_URL: 'http://iframely.com/qa/whitelist.json',
1111
WHITELIST_URL_RELOAD_PERIOD: 60 * 60 * 1000, // will reload WL every hour, if no local files are found in /whitelist folder
1212

1313
WHITELIST_LOG_URL: 'http://iframely.com/whitelist-log',

config.local.js.SAMPLE

+7-11
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414

1515
port: 8061,
1616

17-
// You can set your unique whitelist access url here.
18-
// Iframely will periodically load WL updates from remote file.
19-
// To get one - go to http://iframely.com/qa
20-
WHITELIST_URL: 'http://iframely.com/qa/top100.json',
21-
2217
// Optional SSL cert, if you serve under HTTPS.
2318
/*
2419
ssl: {
@@ -115,12 +110,12 @@
115110
}
116111
},
117112

118-
// WHITELIST_WILDCARD, if present, will be added to whitelist (even absent one) as record for top level domain: "*"
119-
// you can change default behavior of the system using this setting.
120-
// E.g. allowing all open-graph players, denying twitter photos, etc.
121-
// If absent or empty, all generic media parsers will be disabled by default (only domain plugins will work)
122-
// More about format: http://iframely.com/qa/format
113+
// WHITELIST_WILDCARD, if present, will be added to whitelist as record for top level domain: "*"
114+
// with it, you can define what parsers do when they run accross unknown publisher.
115+
// If absent or empty, all generic media parsers will be disabled except for known domains
116+
// More about format: https://iframely.com/docs/qa-format
123117

118+
/*
124119
WHITELIST_WILDCARD: {
125120
"twitter": {
126121
"player": "allow",
@@ -133,7 +128,7 @@
133128
"link": "deny"
134129
},
135130
"og": {
136-
"video": ["allow", "ssl"]
131+
"video": ["allow", "ssl", "responsive"]
137132
},
138133
"iframely": {
139134
"survey": "allow",
@@ -145,6 +140,7 @@
145140
"video": ["allow", "responsive"]
146141
}
147142
}
143+
*/
148144
};
149145

150146
module.exports = config;

docs/SETUP.md

+4-19
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@ At the very least, you need to properly configure:
4141
- `allowedOrigins` - very important to list your main app's domain(s) here, and block access to others
4242

4343

44-
If you got Iframely whitelist with [Domains DB](https://iframely.com/qa), configure the direct link to it as `WHITELIST_URL`. (Default points to Top 100 domains list).
45-
46-
Otherwise, the important piece to configure is `WHITELIST_WILDCARD`. This record indicates the default behavior of the the generic parsers with regards to various embeds protocols and types. For example, you can allow or deny Open Graph videos, any oEmbed types or Twitter Players. If you leave this record empty or omit it alltogether, no additional rich parsers will be enabled, leaving domain providers, meta and thumbnails ones only. See the [record format description](https://iframely.com/qa/format).
47-
48-
There are also some provider-specific values you might want to configure (e.g. wheather to include media in Twitter status embeds). Please, enter your own application keys and secret tokens where applicable. Parsers for Twitter, Flickr and Tumblr won't work without the access tokens to their APIs.
44+
There are also some provider-specific values that are required for some domain plugins to work (e.g. wheather to include media in Twitter status embeds). Please, enter your own application keys and secret tokens where applicable. Parsers for Twitter, Flickr and Tumblr won't work without the access tokens to their APIs.
4945

5046

5147
Readability parser to get the HTML of the articles is optional and is turned off by default as it affects the processing time of the URLs. If need be, you can also fine-tune API response time by disabling image size detection.
@@ -76,9 +72,9 @@ For production deployments, we recommend the cluster mode. It will properly util
7672
Depending on your setup, you may need to configure these pathes in your reverse proxy settings to point to Iframely's Node.js instance:
7773

7874
/r/.+ -- static files (including iframely.js client library)
79-
/iframely -- main API endpoint with get params - returns oEmbed/2 as JSON
80-
/oembed -- wrapper around main API. Returns oEmbed v1 JSON and other meta
81-
/debug -- optional debugger UI with get params
75+
/iframely -- main API endpoint with get params
76+
/oembed -- oEmbed API endpoint
77+
/debug -- optional debugger UI, if you write your own domain plugins
8278
/reader.js -- API endpoint with get params - proxies script to render article
8379
/render -- API endpoint with get params - prexies custom widgets if required
8480
/meta-mappings -- optional API endpoint with available unified meta
@@ -105,16 +101,5 @@ and restart your server afterwards. If you use [Forever](https://github.com/node
105101
If you fork, make sure to merge from the upstream for the newer versions.
106102

107103

108-
## Extend functionality with Domains DB
109-
110-
You can greatly extend gateway functionality without writting additional plugins. Just upload Domains DB JSON file into `whitelist` folder and Iframely will start covering extra domains, generating responsive players, twitter photos, etc via generic plugins.
111-
112-
The file name is expected to be of "iframely-*.json" pattern. Lastest filename uploaded to this directory prevails.
113-
114-
You can get whitelist file with over 1600 domains at [iframely.com/qa/buy](https://iframely.com/qa/buy). Setting `WHITELIST_URL` in config file to your personal access URL will instruct Iframely to load domains DB from the server periodically. If neither local file nor `WHITELIST_URL` are provided, Iframely will use a free file with top 100 domains from [iframely.com/qa/top100.json](http://iframely.com/qa/top100.json).
115-
116-
If you wish to create your own whitelist, please, follow [required file format](http://iframely.com/qa/format).
117-
118-
119104

120105
(c) 2013 [Itteco Software Corp](http://itteco.com). Licensed under MIT. [Get it on Github](https://github.com/itteco/iframely)

lib/whitelist.js

+2-10
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@
273273
if (filename && filename != currentWhitelistFilename) {
274274
readWhitelist(filename);
275275
} else {
276-
console.log('No local Domains DB whitelist file detected...');
276+
console.log('No local whitelist file detected...');
277277
addWildcard();
278278
}
279279

@@ -313,15 +313,7 @@
313313

314314
if (!currentWhitelistFilename && CONFIG.WHITELIST_URL && CONFIG.WHITELIST_URL_RELOAD_PERIOD) {
315315

316-
if (CONFIG.WHITELIST_URL.search(/top100\.json/) > -1) {
317-
console.log("");
318-
console.log("Loading free whitelist with top 100 domains from " + CONFIG.WHITELIST_URL);
319-
console.log("*** Full version (w/ over 1500 domains): http://iframely.com/qa/buy");
320-
console.log("*** Or hosted & All-in-One API: https://iframely.com");
321-
console.log("");
322-
} else {
323-
console.log("Loading whitelist from " + CONFIG.WHITELIST_URL);
324-
}
316+
console.log("Loading whitelist from " + CONFIG.WHITELIST_URL);
325317

326318
request({
327319
uri: CONFIG.WHITELIST_URL,

whitelist/README.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
If you put a whitelist json file here, Iframely will start covering extra domains, converting responsive players, photos, etc.
1+
If you put your own whitelist json file here, Iframely will use it to covere domains through oEmbed, Open Graph and Twitter Cards.
22

33
The file name is expected to be of "iframely-*.json" pattern. Lastest filename uploaded to this directory is used.
44

5-
- You can get whitelist file with over 2000 domains at [http://iframely.com/qa/buy](http://iframely.com/qa/buy).
6-
- Or get free extract file with top 100 domains from the same page.
7-
- Configure `WHITELIST_URL` and `WHITELIST_URL_RELOAD_PERIOD` with your unique access link to download files automatically
5+
Please, follow this [file format](http://iframely.com/qa/format).
86

9-
If you wish to create your own whitelist, please, follow this [file format](http://iframely.com/qa/format).
7+
By default, the package uses Iframely's whitelist with over 1600 domains. We do manual QA every day, so it might be wise of you to rely on us for whitelisting.

0 commit comments

Comments
 (0)