Use the UmbracoApplicationUrl as the base for sheduled task urls, in case they are relative.

This commit is contained in:
Morten Bock
2018-03-01 19:11:37 +01:00
parent 4f062306a6
commit 7c73c379cf

View File

@@ -63,6 +63,10 @@ namespace Umbraco.Web.Scheduling
{
using (var wc = new HttpClient())
{
if (Uri.TryCreate(_appContext.UmbracoApplicationUrl, UriKind.Absolute, out var baseUri))
{
wc.BaseAddress = baseUri;
}
var request = new HttpRequestMessage(HttpMethod.Get, url);
//TODO: pass custom the authorization header, currently these aren't really secured!
@@ -122,4 +126,4 @@ namespace Umbraco.Web.Scheduling
get { return true; }
}
}
}
}