App.accessRule(pattern, [options])
Set a new access rule based on origin domain for your app. By default your application has a limited list of servers it can contact. Use this method to extend this list.
Default access rules:
-
tel:*
,geo:*
,mailto:*
,sms:*
,market:*
are allowed and are handled by the system (e.g. opened in the phone app or an email client) -
http://localhost:*
is used to serve the app's assets from. - The domain or address of the Meteor server to connect to for DDP and hot code push of new versions.
Read more about domain patterns in Cordova docs.
Starting with Meteor 1.0.4 access rule for all domains and protocols (<access origin="*"/>
) is no longer set by default due to certain kind of possible attacks.
Arguments
- pattern String
-
The pattern defining affected domains or URLs.
Options
- type String
-
Possible values:
-
'intent'
: Controls which URLs the app is allowed to ask the system to open. (e.g. in the phone app or an email client). -
'navigation'
: Controls which URLs the WebView itself can be navigated to (can also needed for iframes). -
'network'
or undefined: Controls which network requests (images, XHRs, etc) are allowed to be made.
-
- launchExternal Boolean
-
(Deprecated, use
type: 'intent'
instead.)
Please login to continue.