docs: Add link to CORS setting for REST API
Bug: T391180 Change-Id: Iba11859a36b519feeb460d8ce6c315678011cdb3 (cherry picked from commit d84d8222734dafb31cda1c5dc13032bf67362180)
This commit is contained in:
parent
bdf3614252
commit
9b503d1e52
2 changed files with 6 additions and 4 deletions
|
|
@ -5,8 +5,9 @@ module.exports = ( function () {
|
|||
* an object like {@link mw.Api}, but automatically handle everything required to communicate
|
||||
* with another MediaWiki wiki via cross-origin requests (CORS).
|
||||
*
|
||||
* The foreign wiki must be configured to accept requests from the current wiki. See
|
||||
* <https://www.mediawiki.org/wiki/Manual:$wgCrossSiteAJAXdomains> for details.
|
||||
* The foreign wiki must be configured to accept requests from the current wiki.
|
||||
* For details, see [$wgCrossSiteAJAXdomains](https://www.mediawiki.org/wiki/Manual:$wgCrossSiteAJAXdomains)
|
||||
* and [$wgRestAllowCrossOriginCookieAuth](https://www.mediawiki.org/wiki/Manual:$wgRestAllowCrossOriginCookieAuth).
|
||||
* ```
|
||||
* const api = new mw.ForeignApi( 'https://commons.wikimedia.org/w/api.php' );
|
||||
* api.get( {
|
||||
|
|
|
|||
|
|
@ -5,8 +5,9 @@ module.exports = ( function () {
|
|||
* an object like {@link mw.Rest}, but automatically handles everything required to communicate
|
||||
* with another MediaWiki wiki via cross-origin requests (CORS).
|
||||
*
|
||||
* The foreign wiki must be configured to accept requests from the current wiki. See
|
||||
* <https://www.mediawiki.org/wiki/Manual:$wgCrossSiteAJAXdomains> for details.
|
||||
* The foreign wiki must be configured to accept requests from the current wiki.
|
||||
* For details, see [$wgCrossSiteAJAXdomains](https://www.mediawiki.org/wiki/Manual:$wgCrossSiteAJAXdomains)
|
||||
* and [$wgRestAllowCrossOriginCookieAuth](https://www.mediawiki.org/wiki/Manual:$wgRestAllowCrossOriginCookieAuth).
|
||||
* ```
|
||||
* const api = new mw.ForeignRest( 'https://commons.wikimedia.org/w/rest.php' );
|
||||
* api.get( '/page/Main_Page/html' )
|
||||
|
|
|
|||
Loading…
Reference in a new issue