From e83d8d6a131ad39b98c97c945ccf77bcd723378f Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Tue, 9 Nov 2021 14:21:58 -0500 Subject: [PATCH] Trial fix for CORS pre-flight requests missing headers (see issue #3110, see issue #3200) --- libcef/browser/net_service/proxy_url_loader_factory.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcef/browser/net_service/proxy_url_loader_factory.cc b/libcef/browser/net_service/proxy_url_loader_factory.cc index cdefeb7d3..603b560ea 100644 --- a/libcef/browser/net_service/proxy_url_loader_factory.cc +++ b/libcef/browser/net_service/proxy_url_loader_factory.cc @@ -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(); }