手册:$wgAllowedCorsHeaders

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:$wgAllowedCorsHeaders and the translation is 100% complete.
Other languages:
English • ‎中文 • ‎日本語
API: $wgAllowedCorsHeaders
跨域API请求的允许标头列表。
引进版本:1.35.0 (Gerrit change 585491; git #0ed077d3)
移除版本:仍在使用
允许的值:(数组)
默认值:(参见下方)

默认值

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',
];