@ -8,6 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Changed
- API Key is now sent via the `X-Api-Key` header instead of the `apikey` query parameter. This
lessens the need to redact information in the console.
## [4.4.1] - 2023-04-08
### Fixed
@ -55,13 +55,8 @@ public static class FlurlLogging
public static Url SanitizeUrl(Url url)
{
// Replace hostname and API key for user privacy
// Replace hostname for user privacy
url.Host = "REDACTED";
if (url.QueryParams.Contains("apikey"))
url.QueryParams.AddOrReplace("apikey", "REDACTED");
}
return url;
@ -16,6 +16,6 @@ public class ServiceRequestBuilder : IServiceRequestBuilder
var client = _clientFactory.BuildClient(config.BaseUrl);
return client.Request(new[] {"api", "v3"}.Concat(path).ToArray())
.SetQueryParams(new {apikey = config.ApiKey});
.WithHeader("X-Api-Key", config.ApiKey);