allow setting Travis-API-Version header via ajax

This commit is contained in:
Konstantin Haase 2015-02-18 14:59:57 +01:00
parent f01c9a80b0
commit 68c6b9239d
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ class Travis::Api::App
options // do
headers['Access-Control-Allow-Methods'] = "HEAD, GET, POST, PATCH, PUT, DELETE"
headers['Access-Control-Allow-Headers'] = "Content-Type, Authorization, Accept, If-None-Match, If-Modified-Since, X-User-Agent"
headers['Access-Control-Allow-Headers'] = "Content-Type, Authorization, Accept, If-None-Match, If-Modified-Since, X-User-Agent, Travis-API-Version"
end
end
end

View File

@ -44,7 +44,7 @@ describe Travis::Api::App::Cors do
end
it 'sets Access-Control-Allow-Headers' do
headers['Access-Control-Allow-Headers'].should == "Content-Type, Authorization, Accept, If-None-Match, If-Modified-Since, X-User-Agent"
headers['Access-Control-Allow-Headers'].should == "Content-Type, Authorization, Accept, If-None-Match, If-Modified-Since, X-User-Agent, Travis-API-Version"
end
end
end