### Clone and Install Iframely Source: https://github.com/itteco/iframely/blob/dev/docs/SETUP.md Clone the Iframely repository and install its dependencies using npm. This is the initial setup step for self-hosting. ```bash cd git clone https://github.com/itteco/iframely.git cd iframely npm install ``` -------------------------------- ### Vagrant Up Source: https://github.com/itteco/iframely/blob/dev/docs/DOCKER-BUILD-INSTRUCTION.md Start a Vagrant environment for testing and setup. Navigate to the correct directory first. ```bash vagrant up ``` -------------------------------- ### Install and Run with Forever Source: https://github.com/itteco/iframely/blob/dev/docs/SETUP.md Install the Forever process manager globally and use it to start the Iframely cluster in the background, logging output to a file. ```bash npm install forever -g forever start -a -l iframely.log --killSignal=SIGTERM cluster.js forever logs 0 -fifo ``` -------------------------------- ### Install and Run with PM2 Source: https://github.com/itteco/iframely/blob/dev/docs/SETUP.md Install PM2 globally and use its configuration file (pm2.json) to start and manage the Iframely server, including viewing logs. ```bash npm install pm2 -g pm2 start pm2.json pm2 logs ``` -------------------------------- ### Example getLink Method Source: https://github.com/itteco/iframely/wiki/Writing-a-plugin An example of a getLink method within a plugin. It demonstrates how to access 'meta' and 'oembed' parameters to construct and return a link object with title and description. ```javascript getLink: function(meta, oembed) { return { title: oembed.title, description: meta.description }; } ``` -------------------------------- ### Install libkrb5-dev for npm install errors Source: https://github.com/itteco/iframely/blob/dev/docs/SETUP.md If you encounter 'gssapi/gssapi.h: No such file or directory' during 'npm install', install the libkrb5-dev package. ```bash sudo apt-get install libkrb5-dev ``` -------------------------------- ### Run Iframely Server Source: https://github.com/itteco/iframely/blob/dev/docs/SETUP.md Start the Iframely server from the Iframely home directory using the 'node server' command. ```bash node server ``` -------------------------------- ### Basic API Request Example Source: https://github.com/itteco/iframely/blob/dev/docs/API.md This is a basic example of an HTTP GET request to the Iframely API. Ensure that the 'url' parameter is URL-encoded and 'api_key' is provided for authentication. For enhanced security, 'key' (MD5 hash of API key) can be used instead of 'api_key'. ```http http://iframe.ly/api/iframely?url=… &api_key= … ``` -------------------------------- ### Run Docker Container Source: https://github.com/itteco/iframely/blob/dev/docs/DOCKER-BUILD-INSTRUCTION.md Start the Docker container in the background. Use `docker logs` to monitor its output. ```bash make run ``` -------------------------------- ### Basic Whitelist File Structure Example Source: https://github.com/itteco/iframely/blob/dev/docs/QA Whitelist Format.md This JSON structure defines rules for domains and protocols. Each domain key maps to an object containing protocol-specific settings and test results. ```json { "youtube.com": { "date": "1485789423106", "og": { "video": ["allow", "ssl", "responsive"] }, oembed": { "video": ["allow", "responsive"] }, twitter": { "player": ["allow", "ssl", "responsive"] } }, "mashable.com": { "date": "1485789423106", twitter": { "photo": "deny", "player": ["allow", "ssl", "responsive", "autoplay"] } }, "*.nbcsports.com": { "date": "1485789423106", oembed": { "link": ["allow", "reader"] } }, "iframe.ly": { "date": "1485789423106", "iframely": { "reader": "allow", "player": "allow", "survey": "allow", "image": "allow", "thumbnail": "allow", "logo": "allow" }, twitter": { "player": "allow", "photo": "allow" }, og": { "video": "allow" }, oembed": { "video": "allow", "photo": "allow" } } } ``` -------------------------------- ### Example Meta Data Object Source: https://github.com/itteco/iframely/blob/dev/docs/META.md This is an example of the 'meta' object returned by the Iframely API, showcasing common fields like title, description, author, and site. ```json "meta": { "title": "PARADISE BEACH", "description": "Ilya Trushin", "author_url": "http://coub.com/trucoubs", "author": "Ilya Trushin", "site": "Coub", "canonical": "http://coub.com/view/2pc24rpb", "keywords": "living photo, ... , media" } ``` -------------------------------- ### Sample oEmbed API Request URL Source: https://github.com/itteco/iframely/blob/dev/docs/oEmbed.md Example of how to construct an oEmbed API request URL, including the URL to embed and the API key. ```URL http://iframe.ly/api/oembed?url=… &api_key= … ``` -------------------------------- ### Example Link Object Structure Source: https://github.com/itteco/iframely/blob/dev/docs/LINKS.md Illustrates the typical structure of a link object returned by the Iframely API, showing common fields and their purposes. ```json { // SRC of embed. The main attribute "href": "//coub.com/embed/2pc24rpb", // functional and technical use cases. "rel": ["player", "autoplay", "html5"], // MIME type. Tells: "embed as iFrame" "type": "text/html", "media": { // Media query. Mostly responsive "aspect-ratio": 1.777778 }, // plus generated or native HTML code: "html": "
" } ``` -------------------------------- ### Run Iframely Server in Cluster Mode Source: https://github.com/itteco/iframely/blob/dev/docs/SETUP.md Start the Iframely server in cluster mode using the 'node cluster' command for better CPU utilization on multi-core systems. ```bash node cluster ``` -------------------------------- ### Iframely API Request and Response Source: https://github.com/itteco/iframely/blob/dev/docs/API.md This snippet details how to make a request to the Iframely API and provides an example of the expected response structure. ```APIDOC ## GET /api/iframely ### Description Send a URL via HTTP GET request to Iframely to retrieve semantics, attribution meta data, and embed links. The response mimics the `` element of the requested web page. ### Method GET ### Endpoint `http://iframe.ly/api/iframely?url=…&api_key=…` or `https://iframe.ly/api/iframely?url=…&api_key=…` ### Parameters #### Query Parameters - **url** (string) - Required - The URL to be analyzed. Needs to be URL-encoded. - **api_key** (string) - Required - Your Iframely API key. - **key** (string) - Optional - An alternative to `api_key`, this should be the md5 hash value of your API key for enhanced security. - **group** (boolean) - Optional - When used with the open-source version, setting this to `true` groups the links array by rel, similar to the Cloud API response. ### Request Example ``` http://iframe.ly/api/iframely?url=http://iframe.ly/ACcM3Y&api_key=YOUR_API_KEY ``` ### Response #### Success Response (200) - **id** (string) - Short URL ID, if available. - **url** (string) - Canonical URL. - **rel** (array) - List of primary rel use cases (e.g., "player", "thumbnail"). - **html** (string) - Embed HTML code for the primary media option. - **meta** (object) - Object containing attribution semantics like title, description, author, site, canonical URL, and keywords. - **links** (object) - A collection of embed links grouped by their functional rels (e.g., "player", "thumbnail", "icon"). Each link object may contain `media` details, `href`, `rel`, `type`, and `html` embed code. #### Response Example ```json { "id": "ACcM3Y", "url": "http://coub.com/view/2pc24rpb", "rel": ["player", "ssl"], "html": "
", "meta": { "title": "PARADISE BEACH", "description": "Ilya Trushin", "author_url": "http://coub.com/trucoubs", "author": "Ilya Trushin", "site": "Coub", "canonical": "http://coub.com/view/2pc24rpb", "keywords": "living photo, ... , media" }, "links": { "player": [ { "media": { "aspect-ratio": 1.777778 }, "href": "//coub.com/embed/2pc24rpb", "rel": ["player", "ssl", "html5"], "type": "text/html", "html": "
" } ], "thumbnail": [ { "media": { "height": 360, "width": 640 }, "rel": ["thumbnail"], "type": "image", "href": "http://cdn1.aka ... med_1381670134_00040.jpg" } ], "icon": [ { ... } ] } } ``` ``` -------------------------------- ### Get Latest Git Tag Source: https://github.com/itteco/iframely/blob/dev/docs/DOCKER-BUILD-INSTRUCTION.md Display the most recent git tag, typically representing the latest version. ```bash git tag | tail -n 1 ``` -------------------------------- ### Error Response Body Example Source: https://github.com/itteco/iframely/blob/dev/docs/ERRORS.md When an error occurs during URL processing, Iframely returns a JSON object in the response body containing the status code and an error message. ```json { "status": "404", "error": "Not Found" } ``` -------------------------------- ### Create and Edit Local Configuration Source: https://github.com/itteco/iframely/blob/dev/docs/SETUP.md Copy the sample configuration file to create a local configuration and then edit it using 'vi'. This allows for custom settings without modifying the original sample. ```bash cp config.local.js.SAMPLE config.local.js vi config.local.js ``` -------------------------------- ### Build Docker Image Source: https://github.com/itteco/iframely/blob/dev/docs/DOCKER-BUILD-INSTRUCTION.md Execute the make command to build the Docker image, which uses the $VERSION variable. ```bash make ``` -------------------------------- ### Export Version and Echo Source: https://github.com/itteco/iframely/blob/dev/docs/DOCKER-BUILD-INSTRUCTION.md Set the VERSION shell variable to the latest git tag and print it to confirm. ```bash export VERSION=$(git tag | tail -n 1) echo $VERSION ``` -------------------------------- ### Push Docker Image Source: https://github.com/itteco/iframely/blob/dev/docs/DOCKER-BUILD-INSTRUCTION.md Tag and push the newly built Docker image to Docker Hub. ```bash make push ``` -------------------------------- ### Build Iframely Docker Image Source: https://github.com/itteco/iframely/blob/dev/docs/SETUP.md Build a Docker image for Iframely with the tag 'latest'. ```bash docker build -t iframely:latest . ``` -------------------------------- ### Restart Server with Forever Source: https://github.com/itteco/iframely/blob/dev/docs/SETUP.md If you are using Forever for process management, use this command to restart all processes. ```bash forever restartall ``` -------------------------------- ### Graceful Server Reload with PM2 Source: https://github.com/itteco/iframely/blob/dev/docs/SETUP.md Perform a graceful server reload using PM2, which allows the server to restart without aborting active user connections. ```bash pm2 reload iframely ``` -------------------------------- ### Check Docker Logs Source: https://github.com/itteco/iframely/blob/dev/docs/DOCKER-BUILD-INSTRUCTION.md View the logs of the running iframely Docker container. ```bash docker logs iframely ``` -------------------------------- ### Run Iframely Docker Container Source: https://github.com/itteco/iframely/blob/dev/docs/SETUP.md Run an Iframely Docker container, mapping port 8061, mounting a local configuration file, and naming the container 'iframely'. ```bash docker run -it -p 8061:8061 -v $PWD/config.local.js:/iframely/config.local.js --name iframely iframely:latest ``` -------------------------------- ### Basic Ansible Playbook for Iframely Role Source: https://github.com/itteco/iframely/blob/dev/ansible-docker-iframely/README.md A simple playbook to include and run the Iframely Ansible role on specified hosts. ```yaml --- - hosts: someservers roles: - role: role/ansible-docker-iframely ``` -------------------------------- ### Configuring Plugin Tests with Feed URLs Source: https://github.com/itteco/iframely/blob/dev/docs/WRITE-A-PLUGIN.md Define test cases for plugins using the `tests` array. Include feed URLs for testing RSS/Atom links or page URLs with selectors to extract links. ```javascript tests: [ { feed: "http://gdata.youtube.com/feeds/api/videos" }, { pageWithFeed: "http://www.businessinsider.com/" }, { page: "http://500px.com/upcoming", selector: ".title a", getUrl: function(url) { return url.indexOf('ok') > -1 ? url : null; } }, { geturls: function(cb) { got('https://api.domain.com/items', { responseType: 'json' }) .then(response => { const data = response.body; if (!data || !data.urls) { return cb('No urls in API data'); } cb(null, data.items.slice(0, 10)); }); } } { skipMixins: ["og-title"], skipMethods: ["getLink"] }, "http://www.youtube.com/watch?v=etDRmrB9Css" ] ``` -------------------------------- ### Sample oEmbed API Response for Coub Source: https://github.com/itteco/iframely/blob/dev/docs/oEmbed.md A sample JSON response from the oEmbed API for a Coub URL, demonstrating the structure and fields like 'html', 'type', and 'provider_name'. ```JSON { "url": "http://coub.com/view/2pc24rpb", "type": "rich", "version": "1.0", "title": "PARADISE BEACH", "author": "Ilya Trushin", "author_url": "http://coub.com/trucoubs", "provider_name": "Coub", "thumbnail_url": "http://cdn1 ... /med_1381670134_00040.jpg", "thumbnail_width": 640, "thumbnail_height": 360, "html": "
" } ``` -------------------------------- ### Merge Git Tag and Push Source: https://github.com/itteco/iframely/blob/dev/docs/DOCKER-BUILD-INSTRUCTION.md Checkout the master branch, merge the new version tag, and push changes and tags to the repository. ```bash git checkout master git merge tag-$VERSION git push git push origin $VERSION ``` -------------------------------- ### Ansible Playbook Execution Source: https://github.com/itteco/iframely/blob/dev/docs/DOCKER-BUILD-INSTRUCTION.md Deploy the iframely container using an Ansible playbook. Ensure the playbook and roles are correctly placed. ```yaml ansible-playbook playbooks/iframely.yml ``` -------------------------------- ### Update Iframely Package Source: https://github.com/itteco/iframely/blob/dev/docs/SETUP.md Run these commands from the Iframely home directory to update the package to the latest version. Restart your server afterwards. ```bash git pull ``` -------------------------------- ### Configure Cache Storage Source: https://github.com/itteco/iframely/blob/dev/docs/SETUP.md Define caching parameters in your local configuration file, specifying the cache engine and its Time-To-Live (TTL). ```javascript CACHE_ENGINE: 'memcached', CACHE_TTL: 0 // In milliseconds. 0 for 'never expire' to let cache engine decide itself when to evict the record ``` -------------------------------- ### Marking Plugin as Lowest Priority Source: https://github.com/itteco/iframely/wiki/Writing-a-plugin Use `lowestPriority: true` to indicate that a plugin should provide meta data only if no other plugin has already provided it. ```javascript module.exports = { lowestPriority: true } ``` -------------------------------- ### Graceful Server Restart with SIGUSR2 Source: https://github.com/itteco/iframely/blob/dev/docs/SETUP.md Send a SIGUSR2 signal to the 'cluster.js' process for a graceful server restart, which is supported when using 'node cluster' or Forever. ```bash pkill -USR2 iframely-c ``` -------------------------------- ### oEmbed API Request Source: https://github.com/itteco/iframely/blob/dev/docs/oEmbed.md This section details how to make a request to the oEmbed API endpoint. It specifies the required parameters and provides guidance on URL encoding and security. ```APIDOC ## GET /api/oembed ### Description Retrieves embed codes for a given URL using the oEmbed standard. The HTML embed codes are responsive when possible. ### Method GET ### Endpoint `http://iframe.ly/api/oembed` ### Parameters #### Query Parameters - **url** (string) - Required - The URL to get embed codes for. Must be URL-encoded. - **api_key** (string) - Required - Your Iframely API key. - **key** (string) - Optional - An alternative to `api_key`, this should be the md5 hash value of your API key for enhanced security. ### Request Example `http://iframe.ly/api/oembed?url=http://iframe.ly/ACcM3Y&api_key=YOUR_API_KEY` ### Response #### Success Response (200) Returns an oEmbed object. The `html` field contains the embed code for `rich` and `video` types. For `photo` type, the `url` field contains the image URL. If no embed codes are found, it returns a `link` type object. #### Response Example ```json { "url": "http://coub.com/view/2pc24rpb", "type": "rich", "version": "1.0", "title": "PARADISE BEACH", "author": "Ilya Trushin", "author_url": "http://coub.com/trucoubs", "provider_name": "Coub", "thumbnail_url": "http://cdn1 ... /med_1381670134_00040.jpg", "thumbnail_width": 640, "thumbnail_height": 360, "html": "
" } ``` ``` -------------------------------- ### /render Source: https://github.com/itteco/iframely/blob/dev/docs/WRITE-A-PLUGIN.md Endpoint to render custom widgets. It returns an HTML page with the widget, intended for internal use and automatically generated for the 'text/html' MIME type when 'template_context' or 'template' attributes are provided by a plugin. ```APIDOC ## /render ### Description Endpoint to render custom widgets. It returns an HTML page with the widget, intended for internal use and automatically generated for the 'text/html' MIME type when 'template_context' or 'template' attributes are provided by a plugin. ### Method GET ### Endpoint /render ### Parameters #### Query Parameters - **uri** (string) - Required - page uri to be processed. ### Returns HTML page with widget. ``` -------------------------------- ### Fetch Page Data with Callback Source: https://github.com/itteco/iframely/blob/dev/docs/IFRAMELY.JS.md Fetch data for a given URI using the getPageData method. A callback function is provided to handle the response data or any errors. ```javascript // Get Data. Specify page {URI} and your callback if required $.iframely.getPageData("http://vimeo.com/67452063", function(error, data) { console.log(data); }); ``` -------------------------------- ### Fetch Upstream Changes Source: https://github.com/itteco/iframely/blob/dev/docs/DOCKER-BUILD-INSTRUCTION.md Retrieve the latest changes from the upstream repository. ```bash git fetch upstream ``` -------------------------------- ### /meta-mappings Source: https://github.com/itteco/iframely/blob/dev/docs/WRITE-A-PLUGIN.md Provides unified meta attributes mapping. This endpoint returns a JSON object detailing supported attributes and their sources within plugins. ```APIDOC ## /meta-mappings ### Description Provides unified meta attributes mapping. This endpoint returns a JSON object detailing supported attributes and their sources within plugins. ### Endpoint /meta-mappings ### Response #### Success Response - **attributes** (array) - List of all supported attributes in alphabetic order. - **sources** (object) - Object with each attribute source. - **attribute_name** (array) - List of objects, each specifying the pluginId and source for a meta attribute. - **pluginId** (string) - Plugin in which meta attribute is defined. - **source** (string) - Part of that plugin code which returns meta attribute value. ### Response Example ```json { "attributes": [ "author", "author_url", ... ], "sources": { "author": [ { "pluginId": "twitter-author", "source": "meta.twitter.creator" }, ... ], ... } } ``` ``` -------------------------------- ### Render Link Widgets from API Response Source: https://github.com/itteco/iframely/blob/dev/docs/IFRAMELY.JS.md Iterate through the links provided in the API response and use generateLinkElement to create HTML elements for each link. The generated elements are then appended to the body. ```javascript // Iterate through all links. data.links.forEach(function(link) { // Call generator to create html element for a link. var $el = $.iframely.generateLinkElement(link, data); // Add element to body. $('body').append($el); }); ``` -------------------------------- ### Register Iframes for Responsive Resizing Source: https://github.com/itteco/iframely/blob/dev/docs/IFRAMELY.JS.md After rendering widgets, call registerIframesIn to ensure that iframes, particularly those with type 'text/html', are correctly sized to fit their content without scrollbars. ```javascript $.iframely.registerIframesIn($('body')); ``` -------------------------------- ### Meta Attributes Mapping Structure Source: https://github.com/itteco/iframely/wiki/Writing-a-plugin Describes the JSON structure for unified meta attributes mapping, detailing supported attributes and their sources within plugins. ```json { "attributes": [ -- List of all supported attributes in alphabetic order. "author", "author_url", ... ], "sources": { -- Object with each attribute source. "author": [ { "pluginId": "twitter-author", -- Plugin in which meta attribute is defined. "source": "meta.twitter.creator" -- Part of that plugin code which returns meta attribute value. }, ... ], ... } } ``` -------------------------------- ### Defining Plugin Test Cases Source: https://github.com/itteco/iframely/wiki/Writing-a-plugin The `tests` array defines various scenarios for testing plugin functionality, including direct feeds, pages with embedded feeds, and specific element selectors. ```javascript tests: [ { feed: "http://gdata.youtube.com/feeds/api/videos" }, { pageWithFeed: "http://www.businessinsider.com/" }, { page: "http://500px.com/upcoming", selector: ".title a", getUrl: function(url) { return url.indexOf('ok') > -1 ? url : null; } }, { skipMixins: ["og-title"], skipMethods: ["getLink"] }, "http://www.youtube.com/watch?v=etDRmrB9Css" ] ``` -------------------------------- ### Skipping Feed Tests Source: https://github.com/itteco/iframely/wiki/Writing-a-plugin Configure tests to skip feed-related warnings by setting `noFeeds: true` when test URLs are provided but no corresponding feeds are available. ```javascript tests: [ { noFeeds: true }, "http://www.youtube.com/watch?v=etDRmrB9Css" ] ``` -------------------------------- ### Marking Plugin as Highest Priority Source: https://github.com/itteco/iframely/wiki/Writing-a-plugin Use `highestPriority: true` to indicate that a plugin's meta data should override all other plugins' data. ```javascript module.exports = { highestPriority: true } ``` -------------------------------- ### Include Iframely.js in HTML Source: https://github.com/itteco/iframely/blob/dev/docs/IFRAMELY.JS.md Include jQuery and the iframely.js script in the head section of your HTML. Replace {YOUR.DOMAIN}} with your Iframely Gateway domain. ```html ``` -------------------------------- ### Extracting Video Metadata Source: https://github.com/itteco/iframely/blob/dev/docs/WRITE-A-PLUGIN.md Use the `getMeta` function to extract specific metadata attributes from a given meta object. Ensure attributes are declared on separate lines and avoid other functions with `return` within `getMeta`. ```javascript export default { getMeta: function(meta) { // This prevents non useful errors loging with "undefined". if (!meta.video) return; return { duration: meta.video.duration, // This will extract video duration. date: meta.video.release_date, // If value is undefined - it will be removed from meta. author: meta.video.writer, keywords: meta.video.tag }; } }; ``` -------------------------------- ### Sample Iframely API Response Source: https://github.com/itteco/iframely/blob/dev/docs/API.md This JSON structure represents a typical response from the Iframely API for a given URL. It includes metadata like title, description, author, and canonical URL, as well as embeddable links categorized by their 'rel' type (e.g., player, thumbnail). ```json { "id": "ACcM3Y", // short URL ID, if available // plus canonical URL "url": "http://coub.com/view/2pc24rpb", // rel use cases and html code for primary variant of embed, "rel": ["player", "ssl"], // check for `autoplay` if you request it "html": "
" // meta object with attribution semantics "meta": { "title": "PARADISE BEACH", "description": "Ilya Trushin", "author_url": "http://coub.com/trucoubs", "author": "Ilya Trushin", "site": "Coub", "canonical": "http://coub.com/view/2pc24rpb", "keywords": "living photo, ... , media" }, // Plus list of embed src links with functional rels . For example, "links": { "player": [{ "media": { "aspect-ratio": 1.777778 }, "href": "//coub.com/embed/2pc24rpb", "rel": ["player", "ssl", "html5"], "type": "text/html", "html": "
" }, { ... }], "thumbnail": [{ "media": { "height": 360, "width": 640 }, "rel": ["thumbnail"], "type": "image", "href": "http://cdn1.aka ... med_1381670134_00040.jpg" }, { ... }], // Also possible: // app, image (as rel) ... // reader, survey // logo (rare) "icon": [{ ... }] }, } ``` -------------------------------- ### Extracting Video Metadata Source: https://github.com/itteco/iframely/wiki/Writing-a-plugin The `getMeta` function extracts specific video metadata like duration, release date, author, and keywords from a meta object. It includes a check to prevent errors if the video object is undefined. ```javascript module.exports = { getMeta: function(meta) { // This prevents non useful errors loging with "undefined". if (!meta.video) return; return { duration: meta.video.duration, // This will extract video duration. date: meta.video.release_date, // If value is undefined - it will be removed from meta. author: meta.video.writer, keywords: meta.video.tag }; } }; ``` -------------------------------- ### Override Default Iframely Configuration Source: https://github.com/itteco/iframely/blob/dev/ansible-docker-iframely/README.md Customize the Docker directory and version for Iframely deployment using Ansible variables. ```yaml docker_iframely_dir: /opt/iframely-anotherpath docker_iframely_version: 1.3.0 ``` -------------------------------- ### /reader.js Source: https://github.com/itteco/iframely/blob/dev/docs/WRITE-A-PLUGIN.md Endpoint for article rendering scripts. It returns a JavaScript widget to render an article, intended for internal use and automatically generated for the 'text/x-safe-html' MIME type. ```APIDOC ## /reader.js ### Description Endpoint for article rendering scripts. It returns a JavaScript widget to render an article, intended for internal use and automatically generated for the 'text/x-safe-html' MIME type. ### Method GET ### Endpoint /reader.js ### Parameters #### Query Parameters - **uri** (string) - Required - page uri to be processed. ### Returns JavaScript widget to render article. ``` -------------------------------- ### Stop Iframely Docker Container Source: https://github.com/itteco/iframely/blob/dev/docs/SETUP.md Stop the running Iframely Docker container named 'iframely'. ```bash docker stop iframely ``` -------------------------------- ### Meta Attributes Mapping Structure Source: https://github.com/itteco/iframely/blob/dev/docs/WRITE-A-PLUGIN.md This JSON structure outlines the meta attributes supported by Iframely, detailing which plugins provide them and the specific source within the plugin code. ```json { "attributes": [ "author", "author_url", ... ], "sources": { "author": [ { "pluginId": "twitter-author", "source": "meta.twitter.creator" }, ... ], ... } } ``` -------------------------------- ### Disabling All Tests Source: https://github.com/itteco/iframely/wiki/Writing-a-plugin To disable all tests for a plugin, set `noTest: true` within the `tests` object. ```javascript tests: { noTest: true } ``` -------------------------------- ### Iframely Open-Source API Response Grouping Source: https://github.com/itteco/iframely/blob/dev/docs/API.md For Iframely open-source users, the default API response format may differ by not grouping the links array by 'rel'. To achieve a grouped response similar to the Cloud API, append '&group=true' to your request or configure it in your settings. ```http ?url=…&api_key=…&group=true ``` -------------------------------- ### Set Iframely API Endpoint Source: https://github.com/itteco/iframely/blob/dev/docs/IFRAMELY.JS.md Configure the default API endpoint for the Iframely client. This should be the domain where your Iframely Gateway is hosted. ```javascript // Set endpoint address $.iframely.defaults.endpoint = 'http://{YOUR.IFRAMELY.SERVER.DOMAIN}/iframely'; ``` -------------------------------- ### Nginx Configuration for Iframely Proxy Source: https://github.com/itteco/iframely/blob/dev/ansible-docker-iframely/README.md Configure Nginx to proxy requests to the Iframely service running on localhost:8061. Includes settings to mitigate the httpoxy attack. ```nginx location /iframely { proxy_pass http://localhost:8061; # HTTP 1.1 support proxy_http_version 1.1; proxy_buffering off; proxy_set_header Host $http_host; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $proxy_connection; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto; proxy_set_header X-Forwarded-Ssl $proxy_x_forwarded_ssl; proxy_set_header X-Forwarded-Port $proxy_x_forwarded_port; # Mitigate httpoxy attack (see README for details) proxy_set_header Proxy ""; } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.