phonegap中文文档_PhoneGap中文Api帮助文档

Domain whitelisting is a security model that controls access to

outside domains, such as http://google.com. Apache Cordova's

default security policy allows access to any site. Before moving your

application to production, you should review its whitelist and declare

access to specific network domains and subdomains.

Domain whitelisting lays the groundwork for the W3C Widget Access specification. In the Widget Access specification, the element is used to declare access to specific network domains. In the future, Apache Cordova will abstract the platform whitelisting implementations to the W3C Widget Access specification. However, for now each platform must implement its own domain whitelisting.

Access to google.com:

http://google.com

Access to the secure google.com (https://):

https://google.com

Access to the subdomain maps.google.com:

http://maps.google.com

Access to all the subdomains on google.com (e.g. mail.google.com and docs.google.com):

http://*.google.com

Access to all domains (e.g. google.com and developer.mozilla.org):

*

Details

The whitelisting rules are found in res/xml/config.xml and declared

with the element .

Android fully supports whitelisting syntax.

Syntax

Access to google.com:

Details

The whitelisting rules are found in www/config.xml and declared with the element .

Syntax

Access to google.com:

Access to all the subdomains on google.com:

Access to all domains, including file:// protocol:

Details

The whitelisting rules are found in AppName/config.xml and declared with the element .

iOS fully supports whitelisting syntax.

NOTE: origins specified without a protocol, such as

www.apache.org rather than http://www.apache.org, default to all

of the http, https, ftp, and ftps schemes.

Syntax

Wildcards on iOS (*) are more flexible than the W3C Widget Access specification.

Access to all subdomains and TLDs (.com, .net, etc):

*.google.*

The whitelisting rules are found in config.xml and declared with the element .

Android fully supports whitelisting syntax.

Syntax

Access to google.com:

Details

The application root directory's config.xml file specifies domain

whitelisting rules, using the element.

For a complete reference, see the [Tizen Accessing External Network Resources documentation][10].

Syntax

Access to google.com:

Access to the secure google.com (https://):

Access to all the subdomains on google.com:

Access to all domains, including file:// protocol:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值