Trial fix for CORS pre-flight requests missing headers (see issue #3110, see issue #3200)

This commit is contained in:
Marshall Greenblatt 2021-11-09 14:21:58 -05:00
parent 4c7ac2dddd
commit e83d8d6a13
1 changed files with 2 additions and 2 deletions

View File

@ -158,13 +158,13 @@ class CorsPreflightRequest : public network::mojom::TrustedHeaderClient {
// mojom::TrustedHeaderClient methods:
void OnBeforeSendHeaders(const net::HttpRequestHeaders& headers,
OnBeforeSendHeadersCallback callback) override {
std::move(callback).Run(net::OK, absl::nullopt);
std::move(callback).Run(net::OK, headers);
}
void OnHeadersReceived(const std::string& headers,
const net::IPEndPoint& remote_endpoint,
OnHeadersReceivedCallback callback) override {
std::move(callback).Run(net::OK, absl::nullopt, GURL());
std::move(callback).Run(net::OK, headers, /*redirect_url=*/GURL());
OnDestroy();
}