Skip to content

GetFriendlyUrl ignores site settings when generating absolute URL #46

Description

@kaspars-ozols

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.
image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions