diff --git a/framework/src/Volo.Abp.Http.Client/Microsoft/Extensions/DependencyInjection/ServiceCollectionHttpClientProxyExtensions.cs b/framework/src/Volo.Abp.Http.Client/Microsoft/Extensions/DependencyInjection/ServiceCollectionHttpClientProxyExtensions.cs
index 2f7942fabe..3f71924f9d 100644
--- a/framework/src/Volo.Abp.Http.Client/Microsoft/Extensions/DependencyInjection/ServiceCollectionHttpClientProxyExtensions.cs
+++ b/framework/src/Volo.Abp.Http.Client/Microsoft/Extensions/DependencyInjection/ServiceCollectionHttpClientProxyExtensions.cs
@@ -2,6 +2,7 @@
using System.Linq;
using System.Net.Http;
using System.Reflection;
+using System.Runtime.InteropServices;
using Castle.DynamicProxy;
using JetBrains.Annotations;
using Volo.Abp;
@@ -213,9 +214,14 @@ public static class ServiceCollectionHttpClientProxyExtensions
{
clientBuildAction(remoteServiceConfigurationName, provider, client);
}
- }).ConfigurePrimaryHttpMessageHandler((provider) =>
+ }).ConfigurePrimaryHttpMessageHandler(provider =>
{
- var handler = new HttpClientHandler { UseCookies = false };
+ var handler = new HttpClientHandler();
+
+ if (!RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER")))
+ {
+ handler.UseCookies = false;
+ }
foreach (var handlerAction in preOptions.ProxyClientHandlerActions)
{
@@ -243,6 +249,7 @@ public static class ServiceCollectionHttpClientProxyExtensions
/// Currently the type is checked statically against some fixed conditions.
///
/// Type to check
+ /// Option to filter application service types
/// True, if the type is suitable for proxying. Otherwise false.
private static bool IsSuitableForClientProxying(
Type type,