Browse Source
Update WebAssemblyLookupApiRequestService.cs
pull/18226/head
maliming
3 years ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
1 changed files with
5 additions and
1 deletions
-
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/Extensibility/WebAssemblyLookupApiRequestService.cs
|
|
|
@ -39,7 +39,11 @@ public class WebAssemblyLookupApiRequestService : ILookupApiRequestService, ITra |
|
|
|
var uri = new Uri(url, UriKind.RelativeOrAbsolute); |
|
|
|
if (!uri.IsAbsoluteUri) |
|
|
|
{ |
|
|
|
var remoteServiceConfig = await RemoteServiceConfigurationProvider.GetConfigurationOrDefaultAsync("Default"); |
|
|
|
var remoteServiceConfig = await RemoteServiceConfigurationProvider.GetConfigurationOrDefaultOrNullAsync("Default"); |
|
|
|
if (remoteServiceConfig == null) |
|
|
|
{ |
|
|
|
throw new AbpException("Remote service configuration 'Default' was not found!"); |
|
|
|
} |
|
|
|
client.BaseAddress = new Uri(remoteServiceConfig.BaseUrl); |
|
|
|
await HttpClientAuthenticator.Authenticate(new RemoteServiceHttpClientAuthenticateContext(client, requestMessage, new RemoteServiceConfiguration(remoteServiceConfig.BaseUrl), string.Empty)); |
|
|
|
} |
|
|
|
|