summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/WebService/Server/REST.pm12
1 files changed, 11 insertions, 1 deletions
diff --git a/Bugzilla/WebService/Server/REST.pm b/Bugzilla/WebService/Server/REST.pm
index 72d94acf6..9ee340ccb 100644
--- a/Bugzilla/WebService/Server/REST.pm
+++ b/Bugzilla/WebService/Server/REST.pm
@@ -141,8 +141,18 @@ sub response {
{ rpc => $self, result => \$result, response => $response });
# Access Control
+ my @allowed_headers = qw(
+ accept
+ content-type
+ origin
+ x-bugzilla-api-key
+ x-bugzilla-login
+ x-bugzilla-password
+ x-bugzilla-token
+ x-requested-with
+ );
$response->header("Access-Control-Allow-Origin", "*");
- $response->header("Access-Control-Allow-Headers", "origin, content-type, accept, x-requested-with");
+ $response->header("Access-Control-Allow-Headers", join(', ', @allowed_headers));
# ETag support
my $etag = $self->bz_etag;