EPi.Extensions
EPi.Extensions copied to clipboard
`GetFriendlyUrl` ignores site settings when generating absolute URL
When calling contentReference.GetFriendlyUrl(includeHost: true)
, returned URL has schema based on incoming request, but not based on schema defined in site settings.
https://github.com/Geta/EPi.Extensions/blob/master/src/Geta.EPi.Extensions/Helpers/UriHelpers.cs#L29
This creates problems in following scenarios:
a) site is served through both HTTP & HTTPS, absolute URL should be consistant (for instance, when generating canonical URL)
b) load balanced scenario, when HTTPS is offloaded to load balancer, but it does not add X-Forwarded-Proto
header
Schema from site settings should be respected, if it is defined.