Skip to content

Commit

Permalink
Add x-api-key for LocationServiceClient
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronaldo Macapobre committed Nov 7, 2024
1 parent 523801e commit 580806b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/Infrastructure/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public static IServiceCollection AddHttpClientsAndScvServices(this IServiceColle
// configuration.GetNonEmptyValue("LocationServicesClient:Username"),
// configuration.GetNonEmptyValue("LocationServicesClient:Password"));
client.BaseAddress = new Uri(configuration.GetNonEmptyValue("LocationServicesClient:Url").EnsureEndingForwardSlash());
var apiKey = configuration.GetNonEmptyValue("AWS_API_GATEWAY_API_KEY");
client.DefaultRequestHeaders.Add("x-api-key", apiKey);
}).AddHttpMessageHandler<TimingHandler>();

services.AddHttpClient<UserServiceClient>(client =>
Expand Down

0 comments on commit 580806b

Please sign in to comment.