Manual:$wgAllowedCorsHeaders
Appearance
API: $wgAllowedCorsHeaders | |
---|---|
Lista de encabezados permitidos para solicitudes de API de origen cruzado. |
|
Introducido en la versión: | 1.35.0 (Gerrit change 585491; git #0ed077d3) |
Eliminado en la versión: | aún se usa |
Valores permitidos: | (matriz) |
Valor predeterminado: | (véase abajo) |
Otras configuraciones: Alfabéticamente | Por Función |
Used in the Access-Control-Allow-Headers
response for cross-origin requests coming from a domain that is allowed via $wgCrossSiteAJAXdomains
.
Default value
Versión de MediaWiki: | ≥ 1.40 Gerrit change 921154 |
This was backported to MediaWiki 1.35.11, 1.38.7 and 1.39.4.
$wgAllowedCorsHeaders = [
/* simple headers (see spec) */
'Accept',
'Accept-Language',
'Content-Language',
'Content-Type',
/* non-authorable headers in XHR, which are however requested by some UAs */
'Accept-Encoding',
'DNT',
'Origin',
/* MediaWiki whitelist */
'User-Agent',
'Api-User-Agent',
/* Allowing caching preflight requests, see T269636 */
'Access-Control-Max-Age',
/* OAuth 2.0, see T322944 */
'Authorization',
];
Versiones de MediaWiki: | 1.36 – 1.39 Gerrit change 646768 |
This was backported to MediaWiki 1.35.11.
$wgAllowedCorsHeaders = [
/* simple headers (see spec) */
'Accept',
'Accept-Language',
'Content-Language',
'Content-Type',
/* non-authorable headers in XHR, which are however requested by some UAs */
'Accept-Encoding',
'DNT',
'Origin',
/* MediaWiki whitelist */
'User-Agent',
'Api-User-Agent',
/* Allowing caching preflight requests, see T269636 */
'Access-Control-Max-Age',
];
Versión de MediaWiki: | 1.35 |
$wgAllowedCorsHeaders = [
/* simple headers (see spec) */
'Accept',
'Accept-Language',
'Content-Language',
'Content-Type',
/* non-authorable headers in XHR, which are however requested by some UAs */
'Accept-Encoding',
'DNT',
'Origin',
/* MediaWiki whitelist */
'User-Agent',
'Api-User-Agent',
];