Fix CORS header code to be cleaner

This commit is contained in:
Paul Betts 2015-11-25 15:00:34 -08:00
parent 7622bb40a9
commit 65cb1488b0
4 changed files with 5 additions and 4 deletions

View file

@ -32,8 +32,7 @@ void URLRequestStringJob::GetResponseInfo(net::HttpResponseInfo* info) {
std::string status("HTTP/1.1 200 OK");
net::HttpResponseHeaders* headers = new net::HttpResponseHeaders(status);
std::string cors("Access-Control-Allow-Origin: *");
headers->AddHeader(cors);
headers->AddHeader(kCorsHeader);
if (!mime_type_.empty()) {
std::string content_type_header(net::HttpRequestHeaders::kContentType);