Skip to content

Commit

Permalink
Merge branch 'features/timaqt/jasper-71' of https://github.com/bcgov/…
Browse files Browse the repository at this point in the history
…jasper into features/timaqt/jasper-71
  • Loading branch information
Timaqt authored and Timaqt committed Nov 21, 2024
2 parents 27b9689 + f763fcf commit 210efa5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
11 changes: 3 additions & 8 deletions api/Infrastructure/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ public static IServiceCollection AddMapster(this IServiceCollection services, Ac

public static IServiceCollection AddHttpClientsAndScvServices(this IServiceCollection services, IConfiguration configuration)
{
var apigwKey = configuration.GetNonEmptyValue("AWS_API_GATEWAY_API_KEY");
var authorizerKey = configuration.GetNonEmptyValue("AuthorizerKey");

services.AddTransient<TimingHandler>();
services.AddHttpClient<FileServicesClient>(client =>
{
Expand All @@ -66,12 +63,10 @@ public static IServiceCollection AddHttpClientsAndScvServices(this IServiceColle

services.AddHttpClient<LocationServicesClient>(client =>
{
// client.DefaultRequestHeaders.Authorization = new BasicAuthenticationHeaderValue(
// configuration.GetNonEmptyValue("LocationServicesClient:Username"),
// configuration.GetNonEmptyValue("LocationServicesClient:Password"));
client.DefaultRequestHeaders.Authorization = new BasicAuthenticationHeaderValue(
configuration.GetNonEmptyValue("LocationServicesClient:Username"),
configuration.GetNonEmptyValue("LocationServicesClient:Password"));
client.BaseAddress = new Uri(configuration.GetNonEmptyValue("LocationServicesClient:Url").EnsureEndingForwardSlash());
client.DefaultRequestHeaders.Add(X_APIGW_KEY_HEADER, apigwKey);
client.DefaultRequestHeaders.Add(X_ORIGIN_VERIFY_HEADER, authorizerKey);
}).AddHttpMessageHandler<TimingHandler>();

services.AddHttpClient<UserServiceClient>(client =>
Expand Down
6 changes: 3 additions & 3 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
version: "3.4"
services:

web:
image: "${COMPOSE_PROJECT_NAME}-web"
environment:
Expand Down Expand Up @@ -67,8 +66,9 @@ services:
- SplunkCollectorUrl=${SplunkCollectorUrl}
- SplunkCollectorId=${SplunkCollectorId}
- SplunkToken=${SplunkToken}
- AWS_API_GATEWAY_URL=${AWS_API_GATEWAY_URL}
- AWS_API_GATEWAY_API_KEY=${AWS_API_GATEWAY_API_KEY}
# - AWS_API_GATEWAY_URL=${AWS_API_GATEWAY_URL}
# - AWS_API_GATEWAY_API_KEY=${AWS_API_GATEWAY_API_KEY}
# - AuthorizerKey=${AuthorizerKey}
ports:
- 5000:5000
volumes:
Expand Down

0 comments on commit 210efa5

Please sign in to comment.