You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by mw...@apache.org on 2012/05/31 19:45:47 UTC
[1/2] docs commit: Update whitelisting 1.8.0rc1 from edge.
Updated Branches:
refs/heads/master 481dc21b2 -> 1738b8571
Update whitelisting 1.8.0rc1 from edge.
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/commit/1738b857
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/tree/1738b857
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/diff/1738b857
Branch: refs/heads/master
Commit: 1738b8571aaf63f7404984e07cab7ca787ac4489
Parents: 82aa063
Author: Michael Brooks <mi...@michaelbrooks.ca>
Authored: Thu May 31 10:45:41 2012 -0700
Committer: Michael Brooks <mi...@michaelbrooks.ca>
Committed: Thu May 31 10:45:41 2012 -0700
----------------------------------------------------------------------
docs/en/1.8.0rc1/guide/whitelist/index.md | 86 +++++++++++++++++++-----
1 files changed, 69 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/1738b857/docs/en/1.8.0rc1/guide/whitelist/index.md
----------------------------------------------------------------------
diff --git a/docs/en/1.8.0rc1/guide/whitelist/index.md b/docs/en/1.8.0rc1/guide/whitelist/index.md
index 70286d5..2ce8b3c 100644
--- a/docs/en/1.8.0rc1/guide/whitelist/index.md
+++ b/docs/en/1.8.0rc1/guide/whitelist/index.md
@@ -56,51 +56,102 @@ Access to all domains (e.g. [google.com][2] and [developer.mozilla.org][7]):
Android
-------
-The access rules are found in cordova.xml in res/xml/cordova.xml. These rules follow the [W3C Widget Access][1] specification such that the
-access elements control the whitelist. For example:
+### Details
- <access origin="http://127.0.0.1*"/>
+The whitelisting rules are found in `res/xml/cordova.xml` and declared with the element `<access origin="..." />`.
+
+Android has full support for the whitelisting syntax.
+
+### Syntax
+
+Access to [google.com][2]:
+
+ <access origin="http://google.com" />
Bada
----
+Domain whitelisting is unsupported on Bada. By default, all domains are accessible.
+
BlackBerry
----------
+### Details
+
+The whitelisting rules are found in `www/config.xml` and declared with the element `<access uri="..." />`.
+
+For a complete reference, see the [BlackBerry WebWorks Access Element documentation][8].
+
+### Syntax
+
+Access to [google.com][2]:
+
+ <access uri="http://google.com" subdomains="false" />
+
+Access to [maps.google.com][4]:
+
+ <access uri="http://maps.google.com" subdomains="false" />
+
+Access to all the subdomains on [google.com][2]:
+
+ <access uri="http://google.com" subdomains="true" />
+
+Access to all domains, including `file://` protocol:
+
+ <access uri="*" subdomains="true" />
+
iOS
---
-1. Search for the **Cordova.plist** file in your project.
-2. Add a new **String** value to the **ExternalHosts** key.
+### Details
+
+1. Open `Cordova.plist`.
+ - In Xcode, it is found at `AppName/Supporting Files/Cordova.plist`
+ - In the directory, it is found at `AppName/Cordova.plist`
+2. Add a new `String` value under the `ExternalHosts` key.
+ - We recommend using Xcode to avoid editing raw XML.
+
+Domain protocols (e.g. `http://` and `https://`) are not supported by iOS.
+
+### Syntax
+
+Access to [google.com][2] and the secure [google.com][3] (`https://`):
+
+ google.com
+
+Access to the subdomain [maps.google.com][4]:
+
+ maps.google.com
-For the value of the String, just include the **hostname / IP Address** of the URL **only** without the scheme or the path of the URL.
+Access to all the subdomains on [google.com][2] (e.g. [mail.google.com][5] and [docs.google.com][6]):
-For example, if you have a URL like this: **http://**my.phonegap.com**:443?is_awesome=yes**, the whitelist value would be:
+ *.google.com
- my.phonegap.com
+Access to all domains (e.g. [google.com][2] and [developer.mozilla.org][7]):
-You can also use **wildcards** in the value. For example, if you want to **allow all subdomains**, you would use this value:
+ *
- *.phonegap.com
-
-Similarly, if you want to allow all TLDs also (.com, .net, etc) you would do this:
+Wildcards on iOS (`*`) are more flexible than the [W3C Widget Access][1] specification.
- *.phonegap.*
-
-To allow all domains, you would just add ** "*" ** like so, this will effectively **turn off the whitelist**:
+Access to all subdomains and TLDs (`.com`, `.net`, etc):
- *
-
+ *.google.*
Symbian
-------
+Domain whitelisting is unsupported on Symbian. By default, all domains are accessible.
+
webOS
-----
+Domain whitelisting is unsupported on webOS. By default, all domains are accessible.
+
Windows Phone
-------------
+Domain whitelisting is unsupported on Windows Phone. By default, all domains are accessible.
+
[1]: http://www.w3.org/TR/widgets-access/
[2]: http://google.com
[3]: https://google.com
@@ -108,3 +159,4 @@ Windows Phone
[5]: http://mail.google.com
[6]: http://docs.google.com
[7]: http://developer.mozilla.org
+[8]: https://developer.blackberry.com/html5/documentation/ww_developing/Access_element_834677_11.html