From 7c73c379cf3b2767f139639408fa3d20abed709f Mon Sep 17 00:00:00 2001 From: Morten Bock Date: Thu, 1 Mar 2018 19:11:37 +0100 Subject: [PATCH] Use the UmbracoApplicationUrl as the base for sheduled task urls, in case they are relative. --- src/Umbraco.Web/Scheduling/ScheduledTasks.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Scheduling/ScheduledTasks.cs b/src/Umbraco.Web/Scheduling/ScheduledTasks.cs index c69d42bd27..ad7fef5fd9 100644 --- a/src/Umbraco.Web/Scheduling/ScheduledTasks.cs +++ b/src/Umbraco.Web/Scheduling/ScheduledTasks.cs @@ -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; } } } -} \ No newline at end of file +}