Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetFriendlyUrl ignores site settings when generating absolute URL #46

Open
kaspars-ozols opened this issue Mar 1, 2019 · 0 comments
Open
Assignees

Comments

@kaspars-ozols
Copy link
Contributor

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

@milosmih92 milosmih92 self-assigned this Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants