Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConfigureHttpClient not firing #16313

Closed
alin-devnet opened this issue Jun 13, 2024 · 0 comments
Closed

ConfigureHttpClient not firing #16313

alin-devnet opened this issue Jun 13, 2024 · 0 comments
Labels

Comments

@alin-devnet
Copy link

Orchard Core version

1.8.x

To Reproduce

When adding a http client binding, the ConfigureHttpClient is not firing.

services.AddHttpClient<IService, Service>() .**ConfigureHttpClient**(c => c.BaseAddress = new Uri("test-uri"));

This seems to work fine if the binding is added in ConfigureServices.

builder.Services .AddOrchardCore() .WithTenants() .ConfigureServices((m, serviceProvider) => { services.AddHttpClient<IService, Service>() .**ConfigureHttpClient**(c => c.BaseAddress = new Uri("test-uri")); });

Whilst the above works, my understanding is that each tenant will have it's own HttpClient instance injected and considering each tenant will call the same API, it might end up not using resources optimally (thinking about snat ports here).

@OrchardCMS OrchardCMS locked and limited conversation to collaborators Jun 13, 2024
@Piedone Piedone converted this issue into discussion #16314 Jun 13, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

1 participant