Using a Flash cross-domain policy file when hosting your own feeds or widget assets

From KickApps Documentation

Jump to: navigation, search

If you're using feeds, images, videos, or any other content that isn't hosted by KickApps in your widgets, hosting a simple text file on your server can improve the loading speed and ensure the availability of these assets.

Due to Adobe Flash Player security, KickApps widgets cannot access certain types of content on another server without explicit permission. This access is granted via a special kind of xml file that resides on the server called a Cross-domain Policy File. Without this Flash permission file in place, our widgets have to route these file requests through a proxy server which can cause unnecessary delays or in rare cases interoperability issues.

Adding a Flash cross-domain policy file to your server is easy. Simply add a text file named crossdomain.xml to the same sub-domain as the files you are hosting. The contents of this file should look like this:


CODE


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
  <allow-access-from domain="*.a-widget.com"/>
  <allow-access-from domain="*.kickstatic.com"/>
</cross-domain-policy>


Note that a-widget.com is our widget host domain. You can add multiple domains to this file as you can see in this cross-domain file: http://grammys.com/crossdomain.xml.

<cross-domain-policy>
<allow-access-from domain="*.grammy.com"/>
<allow-access-from domain="grammy.com"/>
<allow-access-from domain="*.a-widget.com"/>
</cross-domain-policy>

For more information on Adobe Flash's Cross-domain policy file, please check out: http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html.