diff --git a/api/Infrastructure/ServiceCollectionExtensions.cs b/api/Infrastructure/ServiceCollectionExtensions.cs index 63568692..be117653 100644 --- a/api/Infrastructure/ServiceCollectionExtensions.cs +++ b/api/Infrastructure/ServiceCollectionExtensions.cs @@ -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(); services.AddHttpClient(client => { @@ -66,12 +63,10 @@ public static IServiceCollection AddHttpClientsAndScvServices(this IServiceColle services.AddHttpClient(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(); services.AddHttpClient(client => diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index c8357c8c..0c62e361 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -1,6 +1,5 @@ version: "3.4" services: - web: image: "${COMPOSE_PROJECT_NAME}-web" environment: @@ -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: