The allowed domain and crossdomainxml
The allowed domain is the value that gets populated within the crossdomain.xml file of our Drupal site. The crossdomain.xml file is a file used by Flash to determine which sites it can communicate with and which sites it cannot. The Services module automatically generates this file using the Drupal menu system. We can see the contents of this simulated file by visiting our domain followed by crossdomain.xml, such as http://localhost/drupal6/crossdomain.xml. Although we do not have a crossdomain.xml file within our Drupal root on our server, the menu system generates this file using the values that we provide in this API key section. Therefore, it is important to provide a value for our allowed domains that will populate this crossdomain.xml file with the correct values. It is also important to note that the http:// should not be included when providing the allowed domain, but any subdirectory that our Drupal root resides in should be included. Following are a list of examples that give the domain name for a web site along with the correct values for the allowed domain values:
Drupal root Allowed Domain
http://www.mysite.com www.mysite.com
http://mysite.com mysite.com
http://www.mysite.com/subdir www.mysite.com/subdir
http://mysite.com/subdir mysite.com/subdir
http://localhost localhost
http://localhost/subdir localhost/subdir
Once we have finished filling out our API key, we should have the following:
Edit key
APr Kev: b77dda3fllOS3aeb42b046dOb5OalB4B
Application title:
Flash Application
The title of Hie application or website l sing Lhsj scrvice.
Allowed domain:
localhost/drupalS
External domain allowed tc use this key. C 5ave key")
When we are done, we can save our key by clicking on the Save key button. After we do this, we should be able to navigate back to our crossdomain.xml file, where we should then see our domain added to the list of allowed domains. Now that we have edited our API Key, we can move on to the next section, where we will learn how to use it within a remote Flash application.
Post a comment