Skip to content

Commit da07460

Browse files
kkuehlzbsclifton
authored andcommitted
Make stats ping api key a header
This will give brave-core parity with iOS. Resolves brave/brave-browser#10230
1 parent 759647c commit da07460

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

browser/brave_stats_updater.cc

+1-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ GURL GetUpdateURL(const GURL& base_update_url,
6060
update_url, "dtoi", stats_updater_params.GetDateOfInstallationParam());
6161
update_url = net::AppendQueryParameter(
6262
update_url, "ref", stats_updater_params.GetReferralCodeParam());
63-
update_url = net::AppendQueryParameter(
64-
update_url, "api_key", brave::GetAPIKey());
6563
return update_url;
6664
}
6765

@@ -198,6 +196,7 @@ void BraveStatsUpdater::SendServerPing() {
198196
net::LOAD_DO_NOT_SEND_COOKIES | net::LOAD_DO_NOT_SAVE_COOKIES |
199197
net::LOAD_BYPASS_CACHE | net::LOAD_DISABLE_CACHE |
200198
net::LOAD_DO_NOT_SEND_AUTH_DATA;
199+
resource_request->headers.SetHeader("X-Brave-API-Key", brave::GetAPIKey());
201200
network::mojom::URLLoaderFactory* loader_factory =
202201
g_browser_process->system_network_context_manager()
203202
->GetURLLoaderFactory();

0 commit comments

Comments
 (0)