Merge pull request #4540 from sbwalker/dev
set BaseAddress for IHttpClientFactory
This commit is contained in:
commit
fdb217d5c6
|
@ -35,6 +35,7 @@ namespace Oqtane.Services
|
|||
if (_factory != null)
|
||||
{
|
||||
var client = _factory.CreateClient("oqtane");
|
||||
client.BaseAddress = new Uri(_siteState.Alias.Protocol + _siteState.Alias.Name);
|
||||
if (!client.DefaultRequestHeaders.Contains(Constants.AntiForgeryTokenHeaderName) && _siteState != null && !string.IsNullOrEmpty(_siteState.AntiForgeryToken))
|
||||
{
|
||||
client.DefaultRequestHeaders.Add(Constants.AntiForgeryTokenHeaderName, _siteState.AntiForgeryToken);
|
||||
|
|
Loading…
Reference in New Issue
Block a user