Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
Merge pull request #641 from brave/asar_vul
Browse files Browse the repository at this point in the history
Do not add "Access-Control-Allow-Origin: *" to response header
  • Loading branch information
bridiver committed Aug 9, 2018
2 parents 7eccb60 + 23163c2 commit f256433
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion atom/browser/net/asar/url_request_asar_job.cc
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ void URLRequestAsarJob::GetResponseInfo(net::HttpResponseInfo* info) {
std::string status("HTTP/1.1 200 OK");
auto* headers = new net::HttpResponseHeaders(status);

headers->AddHeader(atom::kCORSHeader);
info->headers = headers;
}

Expand Down
2 changes: 0 additions & 2 deletions atom/browser/net/url_request_buffer_job.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ void URLRequestBufferJob::GetResponseInfo(net::HttpResponseInfo* info) {
status.append("\0\0", 2);
auto* headers = new net::HttpResponseHeaders(status);

headers->AddHeader(kCORSHeader);

if (!mime_type_.empty()) {
std::string content_type_header(net::HttpRequestHeaders::kContentType);
content_type_header.append(": ");
Expand Down
2 changes: 0 additions & 2 deletions atom/browser/net/url_request_string_job.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ void URLRequestStringJob::GetResponseInfo(net::HttpResponseInfo* info) {
std::string status("HTTP/1.1 200 OK");
auto* headers = new net::HttpResponseHeaders(status);

headers->AddHeader(kCORSHeader);

if (!mime_type_.empty()) {
std::string content_type_header(net::HttpRequestHeaders::kContentType);
content_type_header.append(": ");
Expand Down
2 changes: 0 additions & 2 deletions atom/common/atom_constants.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

namespace atom {

const char kCORSHeader[] = "Access-Control-Allow-Origin: *";

const char kSHA1Certificate[] = "SHA-1 Certificate";
const char kSHA1MajorDescription[] =
"The certificate for this site expires in 2017 or later, "
Expand Down
3 changes: 0 additions & 3 deletions atom/common/atom_constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

namespace atom {

// Header to ignore CORS.
extern const char kCORSHeader[];

// Strings describing Chrome security policy for DevTools security panel.
extern const char kSHA1Certificate[];
extern const char kSHA1MajorDescription[];
Expand Down

0 comments on commit f256433

Please sign in to comment.