U4-5391 - Create config to explicitly set the 'base url' for a website that is not running as a load balanced site - used for scheduled tasks/publishing/keepalive

Created by Shannon Deminick 25 Aug 2014, 07:26:25 Updated by Shannon Deminick 18 Dec 2017, 04:13:03

Relates to: U4-5728

Relates to: U4-5964

Relates to: U4-2059

Relates to: U4-5379

Currently the scheduled tasks/publishing/keepalive works by the server sending requests to itself. It determines the base url from the initial request made, but if ARR or another proxy server is used, the url might not be valid in the environment. We need to create a config setting somewhere to explicitly specify this.

Comments

Stefan Kip 11 Nov 2014, 07:50:59

+1


Shannon Deminick 13 Nov 2014, 04:58:08

You can now add a 'baseUrl' to the umbracoSettings.config file here:

You should only ever specify this if you have a different internal URL to your server than the one that comes in to the server.

This baseUrl will be used for scheduled publishing and the keep alive service.


Dan Booth 19 Dec 2016, 08:53:23

@Shandem I notice you can't add the protocol scheme, here, which can be a problem.

We are using CloudFlare's flexible SSL - https://support.cloudflare.com/hc/en-us/articles/200170416-What-do-the-SSL-options-Off-Flexible-SSL-Full-SSL-Full-SSL-Strict-mean- - which essentially means that the site is served over HTTPS but the server still thinks the site is on HTTP (since the encryption is only between user and CF).

This means that the Umbraco back-end appears on HTTPS (as we have a redirect to force HTTPS), but Umbraco still pings the scheduled URL on HTTP (as IIS still thinks the site is insecure). If I add the protocol to base URL eg.https://mydomain.com then Umbraco will ping http://https://mydomain.com which obviously doesn't work. So I guess what is needed is that if the base URL starts with a protocol don't add one.


Shannon Deminick 28 Dec 2016, 03:28:24

@DanDiplo This setting is obsoleted, the web.routing/umbracoApplicationUrl in umbracoSettings.config file supersedes this setting. Also note that if you do use this scheduled task setting, the thing that makes it into https is setting the umbracoUseSSL in the appSettings


Dan Booth 29 Nov 2017, 10:08:55

@Shandem I realise this is an old issue, but just revisiting. So if I set the web.routing/umbracoApplicationUrl to (say) "https://example.com/umbraco" then Umbraco will change it back to use http if umbracoUseSSL is false? Am I reading you correctly?


Shannon Deminick 18 Dec 2017, 04:13:03

@DanDiplo IIRC whatever you set in web.routing/umbracoApplicationUrl is exactly what is used regardless of umbracoUseSSL - I'm sure you can verify this, it shows up in your logs on startup.


Priority: Normal

Type: Bug

State: Fixed

Assignee: Shannon Deminick

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version: 7.1.9

Sprint:

Story Points:

Cycle: