dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d5af67
)
API: Add User-Agent to CORS allow list
author
Brad Jorsch
<bjorsch@wikimedia.org>
Thu, 13 Dec 2018 17:05:33 +0000
(12:05 -0500)
committer
Kunal Mehta
<legoktm@member.fsf.org>
Wed, 19 Dec 2018 20:11:17 +0000
(12:11 -0800)
An updated spec[1] removed the User-Agent header from the list of forbidden
headers for XHR, so some clients are now requesting to use it.
[1] https://github.com/whatwg/fetch/commit/
dab09b0c483
Change-Id: I43d42c3c3a6510721ff7e5fc406db797bf08ffae
includes/api/ApiMain.php
patch
|
blob
|
history
diff --git
a/includes/api/ApiMain.php
b/includes/api/ApiMain.php
index
bc76f8f
..
3cc3407
100644
(file)
--- a/
includes/api/ApiMain.php
+++ b/
includes/api/ApiMain.php
@@
-829,6
+829,7
@@
class ApiMain extends ApiBase {
'dnt',
'origin',
/* MediaWiki whitelist */
+ 'user-agent',
'api-user-agent',
] );
foreach ( $requestedHeaders as $rHeader ) {