Manual:$wgCrossSiteAJAXdomains
From MediaWiki.org
| API: $wgCrossSiteAJAXdomains | |
|---|---|
| Domains that may make cross-site AJAX requests to the MediaWiki API. |
|
| Introduced in version: | 1.16.0 (r54127) |
| Removed in version: | still in use |
| Allowed values: | array |
| Default value: | array() |
Other settings: Alphabetical | By Function
Details [edit]
Allows AJAX requests from certain domains to make cross-site requests to a wiki's API. This uses the Access-Control-Allow-Origin HTTP header. Note that some older browsers don't support this. This only affects requests to the API. Other entry points (index.php) are not affected.
This variable can be set in 3 ways:
It can be used to allow any domain to access the API via AJAX:
$wgCrossSiteAJAXdomains = array( '*' );
It can be set to an array of domains to allow:
$wgCrossSiteAJAXdomains = array( 'en.wikipedia.org', 'en.wikibooks.org' );
By default the variable is set to an empty array (no external access allowed).
See gerrit:9624 for a usage example.
See also [edit]
| Language: | English • français |
|---|